/* Team Pulse – Global Styles (UP2DATE-inspired editorial design) */

@import url('https://fonts.googleapis.com/css2?family=Exo:ital,wght@0,300;0,400;0,600;0,700;0,800;0,900;1,700&display=swap');

/* ─── CSS Variables ─────────────────────────────────── */
:root {
  --yellow:     #DED114;
  --yellow-bg:  rgba(222,209,20,0.12);
  --yellow-dim: rgba(222,209,20,0.06);
  --black:      #111111;
  --black2:     #191919;
  --card:       #1E1E1E;
  --card2:      #252525;
  --border:     rgba(255,255,255,0.08);
  --border2:    rgba(255,255,255,0.04);
  --white:      #F2F2F0;
  --white-dim:  rgba(242,242,240,0.6);
  --muted:      rgba(242,242,240,0.35);
  --radius:     8px;
  --radius-lg:  14px;
  --t:          0.2s ease;
}

/* ─── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--black);
  color: var(--white);
  line-height: 1.6;
  min-height: 100vh;
}

/* ─── Typography ─────────────────────────────────────── */
h1, h2, h3, h4, .display {
  font-family: 'Exo', sans-serif;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.label-caps {
  font-family: 'Exo', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

a { color: var(--yellow); text-decoration: none; }
a:hover { opacity: 0.8; }

/* ─── Top announcement bar ───────────────────────────── */
.top-bar {
  background: var(--black2);
  border-bottom: 1px solid var(--border);
  padding: 9px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--muted);
}

.top-bar a {
  color: var(--white-dim);
  font-family: 'Exo', sans-serif;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.top-bar a:hover { color: var(--yellow); opacity: 1; }

/* ─── Badge ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--yellow);
  color: var(--black);
  font-family: 'Exo', sans-serif;
  font-weight: 900;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  padding: 3px 8px;
  border-radius: 3px;
}

/* ─── Site Header ────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--black);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 56px;
  max-width: 1280px;
  margin: 0 auto;
}

.logo-wordmark {
  font-family: 'Exo', sans-serif;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: -0.04em;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo-wordmark:hover { opacity: 1; color: var(--white); }

.header-actions { display: flex; align-items: center; gap: 10px; }

/* ─── Display Hero ───────────────────────────────────── */
.display-hero {
  padding: 72px 32px 56px;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
}

.display-hero__title {
  font-family: 'Exo', sans-serif;
  font-weight: 900;
  font-size: clamp(3.5rem, 7vw, 6rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--white);
}

.display-hero__title em {
  font-style: italic;
  color: var(--yellow);
}

.display-hero__meta {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 8px;
}

.display-hero__tagline {
  font-family: 'Exo', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

/* ─── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Exo', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  padding: 11px 22px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all var(--t);
  text-decoration: none;
  white-space: nowrap;
}

.btn--yellow {
  background: var(--yellow);
  color: var(--black);
}
.btn--yellow:hover {
  background: #ece81a;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(222,209,20,0.25);
  opacity: 1;
}

.btn--outline {
  background: transparent;
  color: var(--white-dim);
  border: 1px solid var(--border);
}
.btn--outline:hover {
  border-color: var(--yellow);
  color: var(--yellow);
  opacity: 1;
}

.btn--ghost {
  background: var(--yellow-bg);
  color: var(--yellow);
  border: 1px solid rgba(222,209,20,0.2);
}
.btn--ghost:hover { background: var(--yellow); color: var(--black); opacity: 1; }

.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

/* ─── Pills / Tags ───────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'Exo', sans-serif;
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
}

.pill--yellow { background: var(--yellow); color: var(--black); }
.pill--dim    { background: var(--card2); color: var(--muted); border: 1px solid var(--border); }
.pill--outline { background: transparent; color: var(--yellow); border: 1px solid rgba(222,209,20,0.3); }

/* ─── Divider ────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 0 32px;
}

/* ─── Layout containers ──────────────────────────────── */
.page-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }

/* ─── Cards ──────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.card--hover:hover {
  border-color: rgba(222,209,20,0.2);
  transform: translateY(-2px);
  transition: all var(--t);
}

/* ─── Section label ──────────────────────────────────── */
.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── Stat cards ─────────────────────────────────────── */
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
}

.stat-card .stat-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.stat-card .stat-value { font-family: 'Exo', sans-serif; font-weight: 900; font-size: 2.2rem; color: var(--yellow); letter-spacing: -0.03em; }
.stat-card .stat-sub   { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

/* ─── Survey – light mode ────────────────────────────── */
body.survey-mode {
  background: #F5F4EE;
  color: #111;
}

body.survey-mode .site-header,
body.survey-mode .top-bar {
  background: #fff;
  border-bottom-color: rgba(0,0,0,0.08);
}

body.survey-mode .logo-wordmark { color: #111; }

/* Progress */
.progress-track {
  background: rgba(0,0,0,0.08);
  height: 3px;
  border-radius: 99px;
  margin: 0 0 40px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--yellow);
  border-radius: 99px;
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
}

.progress-label {
  font-family: 'Exo', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 10px;
}

/* Survey card */
.survey-card {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}

.survey-card__title {
  font-family: 'Exo', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #111;
  margin-bottom: 4px;
}

.survey-card__sub {
  font-size: 0.78rem;
  color: #999;
  font-style: italic;
  margin-bottom: 32px;
}

/* Question */
.question-block { margin-bottom: 32px; }

.question-text {
  font-size: 0.93rem;
  color: #2A2A2A;
  margin-bottom: 14px;
  line-height: 1.55;
}

.q-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--yellow);
  color: #111;
  font-family: 'Exo', sans-serif;
  font-weight: 800;
  font-size: 0.7rem;
  border-radius: 4px;
  margin-right: 8px;
  flex-shrink: 0;
  vertical-align: middle;
}

/* Likert */
.likert-outer { display: flex; flex-direction: column; gap: 10px; }

.likert-scale {
  display: flex;
  gap: 6px;
}

.likert-btn {
  flex: 1;
  min-height: 44px;
  border: 1.5px solid rgba(0,0,0,0.12);
  background: #fafafa;
  border-radius: 7px;
  font-family: 'Exo', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: #666;
  cursor: pointer;
  transition: all var(--t);
  display: flex;
  align-items: center;
  justify-content: center;
}

.likert-btn:hover {
  border-color: var(--yellow);
  background: rgba(222,209,20,0.1);
  color: #111;
}

.likert-btn.selected {
  background: var(--yellow);
  border-color: var(--yellow);
  color: #111;
  box-shadow: 0 2px 8px rgba(222,209,20,0.3);
}

.likert-ends {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: #aaa;
  letter-spacing: 0.02em;
}

/* Open question */
.open-block {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid rgba(0,0,0,0.07);
}

.open-label {
  font-size: 0.82rem;
  color: #777;
  font-style: italic;
  margin-bottom: 12px;
  line-height: 1.5;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.open-label::before { content: '💬'; flex-shrink: 0; }

textarea {
  width: 100%;
  min-height: 90px;
  padding: 14px 16px;
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: var(--radius);
  font-family: system-ui, sans-serif;
  font-size: 0.9rem;
  resize: vertical;
  background: #fafafa;
  color: #111;
  transition: border var(--t);
}

textarea:focus { outline: none; border-color: var(--yellow); background: #fff; }

/* Survey nav */
.survey-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid rgba(0,0,0,0.07);
}

/* Welcome inputs */
.field-group { margin-bottom: 20px; }

.field-label {
  display: block;
  font-family: 'Exo', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #777;
  margin-bottom: 8px;
}

.field-input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid rgba(0,0,0,0.12);
  border-radius: var(--radius);
  font-size: 0.95rem;
  background: #fafafa;
  color: #111;
  max-width: 400px;
  transition: border var(--t);
  display: block;
}

.field-input:focus { outline: none; border-color: var(--yellow); background: #fff; }
.field-input::placeholder { color: #bbb; }

/* ─── Dashboard specific ─────────────────────────────── */
.dim-accordion {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 10px;
  overflow: hidden;
}

.dim-accordion__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  cursor: pointer;
  user-select: none;
  transition: background var(--t);
}

.dim-accordion__header:hover { background: rgba(255,255,255,0.03); }

.dim-accordion__title {
  font-family: 'Exo', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dim-accordion__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--muted);
}

.dim-accordion__body { padding: 0 22px 22px; display: none; }
.dim-accordion__body.open { display: block; }

.chevron { transition: transform var(--t); font-size: 0.85rem; color: var(--muted); }
.chevron.open { transform: rotate(90deg); }

/* Heatmap */
.heatmap-wrap { overflow-x: auto; }

.heatmap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.heatmap-table th {
  font-family: 'Exo', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 8px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.heatmap-table th:first-child { text-align: left; }

.heatmap-table td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--border2);
  text-align: center;
  vertical-align: middle;
}

.heatmap-table td:first-child {
  text-align: left;
  color: var(--white-dim);
  font-size: 0.8rem;
  white-space: nowrap;
}

.heat-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.78rem;
}

.heat-1, .heat-2 { background: rgba(220,60,60,0.2);  color: #ff7070; }
.heat-3           { background: rgba(220,120,40,0.2); color: #ffaa60; }
.heat-4           { background: rgba(200,180,20,0.2); color: #e8d44d; }
.heat-5           { background: rgba(140,200,80,0.2); color: #90d060; }
.heat-6, .heat-7  { background: rgba(40,200,100,0.2); color: #50d090; }
.heat-null        { color: var(--muted); }

/* Open answers */
.open-answers { list-style: none; margin-top: 16px; }
.open-answers li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border2);
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--white-dim);
}
.open-answers li:last-child { border-bottom: none; }
.open-name {
  display: block;
  font-family: 'Exo', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 4px;
}

/* Score bar row */
.score-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border2);
}
.score-row:last-child { border-bottom: none; }
.score-icon  { font-size: 1.1rem; flex-shrink: 0; }
.score-name  { flex: 1; font-size: 0.85rem; color: var(--white-dim); }
.score-track { flex: 2; height: 4px; background: var(--border); border-radius: 99px; overflow: hidden; }
.score-fill  { height: 100%; background: var(--yellow); border-radius: 99px; transition: width 1s cubic-bezier(0.4,0,0.2,1); }
.score-num   { font-family: 'Exo', sans-serif; font-weight: 800; font-size: 1.1rem; color: var(--yellow); min-width: 36px; text-align: right; }

/* AI Insights */
.insights-box {
  background: var(--yellow-dim);
  border: 1px solid rgba(222,209,20,0.15);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.insights-box h3 {
  font-family: 'Exo', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--yellow);
  margin: 24px 0 8px;
}

.insights-box h3:first-child { margin-top: 0; }
.insights-box p { font-size: 0.9rem; color: var(--white-dim); line-height: 1.75; }

/* Select */
select {
  background: var(--card);
  color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: system-ui, sans-serif;
}
select:focus { outline: none; border-color: var(--yellow); }

/* Text input (dark) */
input.dark-input {
  background: var(--card);
  color: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.9rem;
  transition: border var(--t);
}
input.dark-input::placeholder { color: var(--muted); }
input.dark-input:focus { outline: none; border-color: var(--yellow); }

/* ─── Login ───────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
  padding: 32px;
}

.login-panel {
  width: 100%;
  max-width: 380px;
}

.login-display {
  font-family: 'Exo', sans-serif;
  font-weight: 900;
  font-size: 3.5rem;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--white);
  margin-bottom: 6px;
}

.login-display em { font-style: italic; color: var(--yellow); }

.login-sub {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 40px;
}

input[type="password"].login-pw {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--white);
  font-size: 1.3rem;
  letter-spacing: 0.2em;
  padding: 16px 20px;
  text-align: center;
  transition: border var(--t);
  margin-bottom: 12px;
}
input[type="password"].login-pw:focus { outline: none; border-color: var(--yellow); }

.login-error {
  font-size: 0.8rem;
  color: #ff6060;
  margin-top: 10px;
  display: none;
  text-align: center;
}

/* ─── Thank you ──────────────────────────────────────── */
.thankyou-wrap {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 32px;
  text-align: center;
}

.thankyou-check {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--yellow-bg);
  border: 2px solid rgba(222,209,20,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 32px;
  font-size: 2.2rem;
}

.thankyou-title {
  font-family: 'Exo', sans-serif;
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.5rem);
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

/* ─── Member list ────────────────────────────────────── */
.member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border2);
  font-size: 0.85rem;
}
.member-row:last-child { border-bottom: none; }
.member-row .name { color: var(--white-dim); }
.member-row .date { color: var(--muted); font-size: 0.75rem; }

/* ─── Chart container ────────────────────────────────── */
.radar-wrap {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

/* ─── Animations ─────────────────────────────────────── */
.fade-up {
  animation: fadeUp 0.5s cubic-bezier(0.4,0,0.2,1) both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.15);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Toast notification ─────────────────────────────── */

/* ─── Dashboard: score bars fix ─────────────────────── */
#scoresList { display: flex; flex-direction: column; }

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
  .display-hero { grid-template-columns: 1fr; padding: 48px 20px 40px; }
  .grid-2, .grid-3, .grid-5 { grid-template-columns: 1fr; }
  .page-wrap { padding: 0 20px; }
  .header-inner { padding: 0 20px; }
  .divider { margin: 0 20px; }
  .survey-card { padding: 22px; }
  .likert-btn { min-height: 40px; font-size: 0.82rem; }
}
