@font-face {
  font-family: 'Graphik';
  src: url('https://brandpie.com/wp-content/themes/brandpie-wordpress/assets/fonts/graphik/Graphik-Medium-Web.woff2') format('woff2'),
       url('https://brandpie.com/wp-content/themes/brandpie-wordpress/assets/fonts/graphik/Graphik-Medium-Web.woff') format('woff');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Financier Display';
  src: url('https://brandpie.com/wp-content/themes/brandpie-wordpress/assets/fonts/financier-display/FinancierDisplay-Regular.woff2') format('woff2'),
       url('https://brandpie.com/wp-content/themes/brandpie-wordpress/assets/fonts/financier-display/FinancierDisplay-Regular.woff') format('woff');
  font-weight: 400;
  font-display: swap;
}

:root {
  --bp-purple: #6e2dfa;
  --bp-purple-light: #9b6fff;
  --bp-purple-tint: #f0ecff;
  --bp-purple-mid: #e4d9ff;
  --ink: #0a051e;
  --muted: #787878;
  --border: #e8e8e8;
  --bg: #f4f4f6;
  --card: #ffffff;
  --green: #1a7a3d;
  --green-tint: #e6f4ea;
  --amber: #a15c00;
  --amber-tint: #fff3dc;
  --red: #c62828;
  --red-tint: #fdecec;
  --grey-tint: #f0f0f2;
  --serif: 'Financier Display', 'Cormorant Garamond', Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Graphik', 'Plus Jakarta Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
button { font-family: inherit; }
.hidden { display: none !important; }

/* ===== Topbar ===== */
.topbar {
  background: #12101f; padding: 14px 40px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.92); font-size: 15px; font-weight: 600; text-decoration: none; }
.brand-logo { width: 34px; height: 34px; border-radius: 8px; display: block; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.nav-user { text-align: right; }
.nav-name { color: rgba(255,255,255,0.88); font-size: 13px; font-weight: 600; }
.nav-email { color: rgba(255,255,255,0.4); font-size: 11px; margin-top: 1px; }
.nav-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #6e2dfa, #201d2d);
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 12px; font-weight: 700; overflow: hidden; flex-shrink: 0;
}
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }
.logout-btn {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1); color: rgba(255,255,255,0.7);
  padding: 7px 16px; border-radius: 100px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.logout-btn:hover { background: rgba(255,255,255,0.12); color: white; }

/* ===== Sign-in ===== */
.auth-gate { display: flex; align-items: center; justify-content: center; flex: 1; padding: 40px; }
.auth-box {
  background: white; border-radius: 24px; padding: 48px; text-align: center; max-width: 400px; width: 100%;
  border: 1px solid var(--border); box-shadow: 0 20px 60px -10px rgba(10,5,30,0.1);
}
.auth-box h2 { font-family: var(--serif); font-size: 30px; font-weight: 400; margin-bottom: 8px; }
.auth-box h2 em { font-style: italic; color: var(--bp-purple); }
.auth-box p { font-size: 13px; color: var(--muted); margin-bottom: 28px; line-height: 1.5; }
.auth-btn {
  background: var(--bp-purple); color: white; border: none; padding: 14px 28px; border-radius: 100px;
  font-weight: 700; font-size: 14px; cursor: pointer; width: 100%;
  box-shadow: 0 8px 24px -8px rgba(110,45,250,0.5);
}
.auth-btn:hover { opacity: 0.92; }
.auth-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.spinner { width: 22px; height: 22px; border: 2px solid var(--bp-purple-mid); border-top-color: var(--bp-purple); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 0 auto 16px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Layout ===== */
.page { width: 100%; max-width: 980px; margin: 0 auto; padding: 32px 24px 56px; flex: 1; }

/* ===== Large pill nav ===== */
.pill-nav {
  display: flex; gap: 6px; padding: 6px; margin: 0 auto 32px; width: fit-content;
  background: var(--card); border: 1px solid var(--border); border-radius: 100px;
  box-shadow: 0 8px 30px -12px rgba(10,5,30,0.12);
}
.pill {
  border: none; background: transparent; color: var(--ink);
  font-size: 16px; font-weight: 600; padding: 14px 34px; border-radius: 100px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px; transition: background 0.15s, color 0.15s;
}
.pill:hover { background: var(--bp-purple-tint); }
.pill.active { background: var(--bp-purple); color: white; box-shadow: 0 8px 20px -8px rgba(110,45,250,0.6); }
.pill-count {
  font-size: 12px; font-weight: 700; min-width: 24px; padding: 3px 8px; border-radius: 100px;
  background: var(--bp-purple-tint); color: var(--bp-purple);
}
.pill.active .pill-count { background: rgba(255,255,255,0.22); color: white; }

/* ===== Hero ===== */
.hero {
  background: #12101f; color: white; border-radius: 24px; padding: 32px 36px; margin-bottom: 28px;
  display: flex; align-items: center; gap: 32px; flex-wrap: wrap;
}
.hero-text { flex: 1; min-width: 240px; }
.hero-eyebrow { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.5); margin-bottom: 8px; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: 36px; line-height: 1.1; margin-bottom: 10px; }
.hero h1 em { font-style: italic; color: var(--bp-purple-light); }
.hero-sub { color: rgba(255,255,255,0.65); font-size: 14px; }
.hero-stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.hero-stat { background: rgba(255,255,255,0.08); border-radius: 12px; padding: 8px 14px; font-size: 13px; color: rgba(255,255,255,0.8); }
.hero-stat b { color: white; font-size: 16px; margin-right: 4px; }
.hero-stat.bad b { color: #ff8a80; }

.ring { --p: 0; width: 132px; height: 132px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--bp-purple-light) calc(var(--p) * 1%), rgba(255,255,255,0.1) 0);
  display: flex; align-items: center; justify-content: center; }
.ring-inner { width: 104px; height: 104px; border-radius: 50%; background: #12101f; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-value { font-size: 28px; font-weight: 700; }
.ring-label { font-size: 11px; color: rgba(255,255,255,0.5); }

/* ===== Sections & campaign cards ===== */
.section-title { font-family: var(--serif); font-size: 24px; font-weight: 400; margin: 8px 0 14px; display: flex; align-items: baseline; gap: 10px; }
.section-title small { font-family: 'Graphik', 'Plus Jakarta Sans', sans-serif; font-size: 13px; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 22px 24px; margin-bottom: 16px; }
.card.current { border: 2px solid var(--bp-purple); box-shadow: 0 16px 40px -20px rgba(110,45,250,0.45); }
.campaign-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.campaign-name { font-size: 17px; font-weight: 600; }
.campaign-meta { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 4px 10px; border-radius: 100px; background: var(--bp-purple); color: white; margin-left: 8px; vertical-align: 2px; }
.campaign-progress { min-width: 180px; text-align: right; }
.campaign-progress .pct { font-size: 20px; font-weight: 700; }
.campaign-progress .of { font-size: 12px; color: var(--muted); }

.bar { height: 8px; background: var(--grey-tint); border-radius: 100px; overflow: hidden; margin-top: 8px; }
.bar > span { display: block; height: 100%; background: var(--bp-purple); border-radius: 100px; }
.bar.complete > span { background: var(--green); }

.courses { list-style: none; margin-top: 18px; border-top: 1px solid var(--border); }
.course { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.course:last-child { border-bottom: none; padding-bottom: 0; }
.course-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: #c4c4c8; }
.course-main { flex: 1; min-width: 0; }
.course-name { font-weight: 500; }
.course-type { font-size: 12px; color: var(--muted); margin-top: 2px; }

.status { font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 100px; white-space: nowrap; background: var(--grey-tint); color: #555; }
.st-done .status { background: var(--green-tint); color: var(--green); }
.st-done .course-dot { background: var(--green); }
.st-progress .status { background: var(--amber-tint); color: var(--amber); }
.st-progress .course-dot { background: #f0a020; }
.st-overdue .status { background: var(--red-tint); color: var(--red); }
.st-overdue .course-dot { background: var(--red); }

.empty { background: var(--card); border: 1px dashed #d4d4da; border-radius: 18px; padding: 28px; text-align: center; color: var(--muted); margin-bottom: 16px; }

.btn-secondary {
  display: block; margin: 24px auto 0; background: var(--card); color: var(--bp-purple);
  border: 1.5px solid var(--bp-purple-mid); border-radius: 100px; padding: 12px 26px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-secondary:hover { background: var(--bp-purple-tint); }
.year-block { margin-top: 28px; }

/* ===== Reports ===== */
.team-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 24px; }
.team-stat { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 18px 20px; }
.team-stat .v { font-size: 26px; font-weight: 700; }
.team-stat .l { font-size: 12px; color: var(--muted); margin-top: 2px; }
.team-stat.bad .v { color: var(--red); }

.person { background: var(--card); border: 1px solid var(--border); border-radius: 18px; margin-bottom: 12px; overflow: hidden; }
.person-row { width: 100%; border: none; background: none; text-align: left; cursor: pointer; display: flex; align-items: center; gap: 16px; padding: 16px 20px; color: inherit; font-size: inherit; }
.person-row:hover { background: #fbfaff; }
.person-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--bp-purple-tint); color: var(--bp-purple); font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.person-main { flex: 1; min-width: 0; }
.person-name { font-weight: 600; font-size: 15px; }
.person-email { font-size: 12px; color: var(--muted); }
.person-progress { width: 220px; }
.person-progress .line { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.person-progress .line b { color: var(--ink); font-size: 14px; }
.chev { color: var(--muted); transition: transform 0.2s; font-size: 18px; }
.person.open .chev { transform: rotate(90deg); }
.person-detail { padding: 4px 20px 22px; border-top: 1px solid var(--border); background: #fcfcfd; }
.person-detail .card { margin-top: 16px; }
.flag { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 100px; background: var(--red-tint); color: var(--red); margin-left: 8px; }
.flag.muted { background: var(--grey-tint); color: var(--muted); }

.footer { margin-top: 40px; text-align: center; font-size: 12px; color: var(--muted); }

@media (max-width: 720px) {
  .topbar { padding: 12px 16px; }
  .nav-user { display: none; }
  .page { padding: 20px 16px 48px; }
  .pill-nav { width: 100%; }
  .pill { flex: 1; justify-content: center; padding: 13px 12px; font-size: 15px; }
  .hero { padding: 24px; gap: 20px; }
  .hero h1 { font-size: 28px; }
  .ring { width: 108px; height: 108px; }
  .ring-inner { width: 84px; height: 84px; }
  .ring-value { font-size: 22px; }
  .campaign-progress { text-align: left; min-width: 0; width: 100%; }
  .person-progress { display: none; }
  .card { padding: 18px; }
}
