:root {
      --bg: #f6f7fb;
      --panel: #ffffff;
      --text: #111827;
      --muted: #667085;
      --border: #e5e7eb;
      --blue: #263583;
      --yellow: #fae92d;
      --yellow-soft: rgba(250, 233, 45, 0.22);
      --dark: #101828;
      --shadow: 0 20px 60px rgba(38, 53, 131, 0.12);
      --radius: 16px;
    }

    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      font-family: Inter, Arial, sans-serif;
      background:
        linear-gradient(90deg, rgba(38, 53, 131, 0.04) 1px, transparent 1px),
        linear-gradient(rgba(38, 53, 131, 0.04) 1px, transparent 1px),
        linear-gradient(135deg, #ffffff 0%, var(--bg) 100%);
      background-size: 42px 42px, 42px 42px, auto;
      color: var(--text);
    }

    .wrap {
      max-width: 1280px;
      margin: 0 auto;
      padding: 36px 22px 60px;
    }

    .hero {
      display: block;
      margin-bottom: 24px;
    }

    .hero-main,
    .panel,
    .stat-card,
    .podium-card,
    .activity-card,
    .bottom-status,
    .month-link,
    .picker-card {
      background: var(--panel);
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
    }

    .hero-main {
      padding: 30px 34px;
      position: relative;
      overflow: hidden;
      background: var(--blue);
      color: white;
      min-height: 300px;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
       border-radius: 18px !important;
    }

    .hero-main:after {
      content: "";
      position: absolute;
      width: 460px;
      height: 460px;
      border-radius: 999px;
      background: var(--yellow);
      right: -130px;
      bottom: -260px;
      opacity: 0.95;
    }

    .topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      position: relative;
      z-index: 1;
      margin-bottom:20px;
    }

    .logo {
      display: block;
      width: 154px;
      max-width: 100%;
      height: auto;
    }

    .period-pill {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 8px 12px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.12);
      color: white;
      font-size: 13px;
      font-weight: 800;
      white-space: nowrap;
    }

    h1 {
      margin: 0;
      max-width: 760px;
      font-size: clamp(38px, 6vw, 76px);
      line-height: 0.92;
      letter-spacing: -0.06em;
      color: white;
      position: relative;
      z-index: 1;
    }

    .intro {
      max-width: 640px;
      margin: 18px 0 0;
      color: rgba(255, 255, 255, 0.76);
      font-size: 17px;
      line-height: 1.55;
      position: relative;
      z-index: 1;
    }

    .stats-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 16px;
      margin-bottom: 24px;
    }

    .stat-card {
      padding: 22px;
    }

    .stat-label {
      color: var(--muted);
      font-size: 13px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      margin-bottom: 10px;
    }

    .stat-value {
      font-size: 38px;
      line-height: 1;
      font-weight: 900;
      letter-spacing: -0.04em;
      color: var(--dark);
    }

    .section-title {
      display: flex;
      justify-content: space-between;
      align-items: end;
      gap: 16px;
      margin: 34px 0 14px;
    }

    .section-title h2 {
      margin: 0;
      font-size: 26px;
      letter-spacing: -0.03em;
    }

    .section-title p {
      margin: 0;
      color: var(--muted);
      font-size: 14px;
    }

    .podium-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 16px;
      margin-bottom: 24px;
    }

    .podium-card {
      padding: 24px;
      position: relative;
      overflow: hidden;
    }

    .podium-card:first-child {
      background: var(--blue);
      color: white;
    }

    .podium-card:first-child .podium-meta,
    .podium-card:first-child .podium-sub {
      color: rgba(255, 255, 255, 0.72);
    }

    .podium-rank {
      display: inline-flex;
      width: 42px;
      height: 42px;
      align-items: center;
      justify-content: center;
      border-radius: 999px;
      background: var(--yellow);
      color: var(--blue);
      font-weight: 900;
      margin-bottom: 18px;
    }

    .podium-name {
      font-size: 24px;
      font-weight: 900;
      letter-spacing: -0.03em;
      margin-bottom: 8px;
    }

    .podium-points {
      font-size: 46px;
      font-weight: 950;
      letter-spacing: -0.06em;
      line-height: 1;
      margin-bottom: 8px;
    }

    .podium-sub,
    .podium-meta {
      color: var(--muted);
      font-size: 14px;
    }

    .content-grid {
      display: grid;
      grid-template-columns: minmax(240px, 0.32fr) minmax(0, 1fr);
      gap: 18px;
      align-items: start;
    }

    .leaderboard-panel {
      width: 100%;
    }

    .panel {
      padding: 22px;
    }

.homepage-table-panel {
  margin-bottom: 24px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 14px 35px rgba(38, 53, 131, 0.08);
}

.activity-matrix-panel {
  margin-top: 24px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 14px 35px rgba(38, 53, 131, 0.08);
}

    .activity-list {
      display: grid;
      gap: 12px;
    }

    .activity-card {
      box-shadow: none;
      padding: 16px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 14px;
    }

    .activity-name {
      font-weight: 800;
      color: var(--dark);
    }

    .activity-note {
      color: var(--muted);
      font-size: 13px;
      margin-top: 3px;
    }

    .activity-count {
      min-width: 54px;
      height: 54px;
      border-radius: 16px;
      background: var(--yellow-soft);
      color: var(--blue);
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 900;
      font-size: 22px;
    }

    .table-wrap {
      overflow-x: auto;
      border-radius: 0;
      margin-left: -22px;
      margin-right: -22px;
    }

    table {
      width: 100%;
      border-collapse: collapse;
      background: white;
      overflow: visible;
    }

    th,
    td {
      padding: 16px;
      text-align: left;
      border-bottom: 1px solid var(--border);
      white-space: nowrap;
      font-size: 14px;
    }

    th {
      background: transparent;
      color: var(--blue);
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      border-top: 1px solid var(--border);
      border-bottom: 2px solid var(--blue);
    }

    td:first-child {
      font-weight: 900;
      color: var(--blue);
    }

    td:nth-child(2) {
      font-weight: 800;
      color: var(--dark);
    }

    tr:last-child td {
      border-bottom: none;
    }

    .goals-panel {
      margin-top: 24px;
      overflow: hidden;
    }

    .goal-progress {
      min-width: 130px;
    }

    .progress-bar {
      width: 100%;
      height: 10px;
      overflow: hidden;
      border-radius: 999px;
      background: #eef2ff;
      margin-top: 6px;
    }

    .progress-fill {
      height: 100%;
      border-radius: 999px;
      background: var(--blue);
    }

    .progress-label {
      font-weight: 800;
      color: var(--blue);
      font-size: 13px;
    }

    .goal-summary-grid {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 16px;
      margin-bottom: 26px;
    }

    .goal-summary-card {
      padding: 18px;
      border-radius: 18px;
      background: linear-gradient(135deg, rgba(38,53,131,0.06), rgba(250,233,45,0.12));
      border: 1px solid rgba(38,53,131,0.08);
    }

    .goal-summary-label {
      font-size: 12px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      color: var(--muted);
      margin-bottom: 10px;
    }

    .goal-summary-value {
      font-size: 36px;
      font-weight: 900;
      line-height: 1;
      letter-spacing: -0.04em;
      color: var(--blue);
    }

    .goal-summary-note {
      margin-top: 8px;
      font-size: 13px;
      color: var(--muted);
    }

    .goals-table td:first-child {
      min-width: 220px;
    }

    .goal-name {
      display: flex;
      flex-direction: column;
      gap: 3px;
    }

    .goal-name strong {
      font-size: 15px;
      color: var(--dark);
    }

    .goal-name span {
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }

    .goal-chip {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 7px 10px;
      border-radius: 999px;
      font-size: 12px;
      font-weight: 800;
      background: rgba(38,53,131,0.08);
      color: var(--blue);
    }

    .goal-points {
      font-size: 18px;
      font-weight: 900;
      color: var(--dark);
    }

    .goal-target {
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      margin-top: 4px;
    }

    .month-tools {
      display: block;
      width: 100%;
      margin-top: 24px;
      margin-bottom: 24px;
    }

    .picker-card,
    .bottom-status {
      padding: 22px 26px;
    }

.month-picker-card {
  display: none;
}

.month-archive-card {
  width: 100%;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 14px 35px rgba(38, 53, 131, 0.08);
  background: #ffffff;
}

.month-archive-card .stat-label {
  font-size: 18px;
  color: var(--dark);
  text-transform: none;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

    .picker-controls {
      display: flex;
      gap: 12px;
      align-items: center;
      flex-wrap: wrap;
    }

    input[type="month"] {
      min-width: 180px;
      padding: 13px 14px;
      border: 1px solid var(--border);
      border-radius: 12px;
      font: inherit;
      color: var(--dark);
    }

    .secondary-btn,
    #refreshBtn {
      min-width: 180px;
      padding: 14px 18px;
      border: 1px solid var(--blue);
      border-radius: 12px;
      background: white;
      color: var(--blue);
      cursor: pointer;
      font-size: 15px;
      font-weight: 800;
    }

    .secondary-btn:hover,
    #refreshBtn:hover {
      transform: translateY(-1px);
    }

    .bottom-status {
      margin-top: 28px;
      display: grid;
      grid-template-columns: 1fr auto;
      align-items: center;
      gap: 24px;
    }

    .site-footer {
      margin-top: 28px;
      padding: 18px 20px 0;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      color: #111827;
      text-align: center;
    }

    .site-footer span {
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.01em;
    }

    .p36-logo {
      display: block;
      width: 70px;
      max-width: 100%;
      height: auto;
    }

    .updated {
      color: var(--muted);
      font-size: 14px;
      line-height: 1.5;
    }

    #refreshBtn:disabled {
      opacity: 0.6;
      cursor: not-allowed;
      transform: none;
    }

    .month-links {
      display: flex;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
      margin-top: 16px;
    }

    .month-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 140px;
      min-height: 58px;
      padding: 16px 20px;
      border-radius: 14px;
      border: 1px solid var(--border);
      background: #ffffff;
      color: var(--blue);
      text-decoration: none;
      font-weight: 900;
      font-size: 18px;
      line-height: 1;
      cursor: pointer;
      box-shadow: 0 10px 25px rgba(38, 53, 131, 0.06);
      transition: all 0.2s ease;
    }

    .month-link.is-active {
      background: var(--blue);
      color: #ffffff;
      border-color: var(--blue);
    }

    .month-link:hover {
      transform: translateY(-2px);
    }

    .loading,
    .error {
      background: white;
      padding: 22px;
      border-radius: var(--radius);
      box-shadow: var(--shadow);
    }

    .error {
      border: 1px solid #fecaca;
      color: #991b1b;
    }

    @media (max-width: 900px) {
      .content-grid,
      .bottom-status {
        grid-template-columns: 1fr;
      }

      .stats-grid,
      .podium-grid,
      .goal-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .hero-main {
        min-height: 280px;
      }
    }

    @media (max-width: 620px) {
      .wrap {
        padding: 22px 14px 40px;
      }

      .hero-main,
      .bottom-status,
      .panel,
      .stat-card,
      .podium-card,
      .picker-card {
        border-radius: 18px;
      }

      .stats-grid,
      .podium-grid,
      .goal-summary-grid {
        grid-template-columns: 1fr;
      }

      .site-footer {
        flex-direction: row;
        justify-content: center;
      }

      .month-link {
        width: 100%;
      }
    }


.activity-matrix-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
}

.compact-activity-card {
  min-height: 0;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  padding: 16px;
  box-shadow: none;
}

.compact-activity-card .activity-count {
  min-width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--yellow-soft);
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 22px;
  padding: 0;
  margin: 0;
}

.activity-matrix-grid .activity-card {
  min-height: 230px;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  padding: 22px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: 0 12px 28px rgba(38, 53, 131, 0.08);
}

.activity-icon {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  margin-bottom: 14px;
}

.activity-icon.site {
  background: #20c997;
}

.activity-icon.face {
  background: #8b5cf6;
}

.activity-icon.office {
  background: #fb923c;
}

.activity-icon.zoom {
  background: #3b82f6;
}

.activity-icon.call {
  background: #14b8a6;
}

.activity-matrix-grid .activity-name {
  font-size: 16px;
  margin-bottom: 4px;
}

.activity-matrix-grid .activity-note {
  margin: 0;
}

.activity-matrix-grid .activity-count {
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  border-radius: 0;
  background: transparent;
  color: var(--blue);
  display: block;
  font-size: 42px;
  line-height: 1;
  padding: 0;
  margin: 16px 0;
}

.activity-total-points {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(38, 53, 131, 0.05);
  color: var(--dark);
  font-size: 13px;
  font-weight: 800;
}

.activity-total-points strong {
  color: var(--blue);
  font-size: 16px;
}


@media (max-width: 900px) {
  .activity-matrix-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .activity-matrix-grid {
    grid-template-columns: 1fr;
  }
}

.goal-progress {
  min-width: 220px;
}

.goal-progress-card {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #f8fafc;
}

.goal-progress-card.is-green {
  background: rgba(22, 163, 74, 0.08);
  border-color: rgba(22, 163, 74, 0.25);
}

.goal-progress-card.is-amber {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}

.goal-progress-card.is-red {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
}

.goal-rag {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.goal-rag.is-green {
  background: #dcfce7;
  color: #166534;
}

.goal-rag.is-amber {
  background: #fef3c7;
  color: #92400e;
}

.goal-rag.is-red {
  background: #fee2e2;
  color: #991b1b;
}

.progress-fill.is-green {
  background: #16a34a;
}

.progress-fill.is-amber {
  background: #f59e0b;
}

.progress-fill.is-red {
  background: #ef4444;
}

.progress-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.progress-target-note {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.goal-progress {
  min-width: 260px;
}

.goal-progress-heading {
  min-width: 260px;
}

.goal-progress-card {
  width: 100%;
  min-width: 240px;
  padding: 14px;
}

.goal-progress-card.is-neutral {
  background: rgba(102, 112, 133, 0.08);
  border-color: rgba(102, 112, 133, 0.18);
}

.goal-rag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

.goal-rag.is-neutral {
  background: #f2f4f7;
  color: #475467;
}

.progress-fill.is-neutral {
  background: #98a2b3;
}

.progress-label {
  font-weight: 900;
  font-size: 16px;
  line-height: 1;
}

.progress-target-note {
  margin-top: 5px;
  line-height: 1.2;
}

.progress-bar {
  margin-top: 0;
}
body[data-view="hubspot"] .wrap {
  max-width: none;
  width: 100%;
  padding: 16px;
}