/* =====================================================================
   THINK BIG ACADEMY — SHARED PORTAL STYLES
   ---------------------------------------------------------------------
   Reuses EXACT design tokens from claim.html.
   Referenced by: login.html, student-dashboard.html, parent-dashboard.html
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:         #1E0A02;
  --brick:        #E05C18;
  --gold:         #F0A010;
  --cream:        #FFFAF0;
  --muted:        #7A5A38;
  --radius:       0.625rem;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--navy);
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background glow — identical to claim.html */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -5%,  rgba(224,92,24,0.42) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 90% 100%, rgba(240,160,16,0.16) 0%, transparent 60%),
    linear-gradient(180deg, #2A0A02 0%, #1E0A02 55%, #0E0402 100%);
  z-index: 0;
  pointer-events: none;
}

.portal-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ─── SKIP LINK (accessibility) ───────────────────────── */
.skip-link {
  position: absolute;
  top: -999px;
  left: 0;
  background: var(--brick);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 999;
  font-size: 0.875rem;
  font-weight: 600;
}
.skip-link:focus { top: 0; }

/* ─── PORTAL HEADER ───────────────────────────────────── */
.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  gap: 0.75rem;
}
@media (min-width: 640px)  { .portal-header { padding: 1rem 1.5rem; } }
@media (min-width: 768px)  { .portal-header { padding: 1.125rem 2rem; } }
@media (min-width: 1024px) { .portal-header { padding: 1.25rem 2rem; max-width: 1140px; margin-inline: auto; width: 100%; } }

.portal-brand { display: flex; flex-direction: column; }
.portal-brand__name {
  font-family: var(--font-display);
  font-size: clamp(0.9375rem, 2.5vw, 1.0625rem);
  color: var(--gold);
  letter-spacing: 0.02em;
  line-height: 1;
}
.portal-brand__sub {
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-top: 0.2rem;
}

.portal-header__right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.portal-header__user {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}
.portal-avatar {
  width: 2.125rem;
  height: 2.125rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #C04410, var(--brick));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.portal-header__name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  line-height: 1.2;
}
.portal-header__sub {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.38);
}
/* Hide name+sub on very small screens to save space */
@media (max-width: 399px) { .portal-header__name-wrap { display: none; } }

.portal-logout {
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(255,255,255,0.3);
  text-decoration: none;
  padding: 0.375rem 0.625rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.1);
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.portal-logout:hover { color: rgba(255,255,255,0.7); border-color: rgba(255,255,255,0.25); }

/* ─── TAB NAVIGATION ──────────────────────────────────── */
.portal-nav-wrap {
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.portal-nav {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 1.25rem;
  gap: 0;
  max-width: 1140px;
  margin-inline: auto;
}
.portal-nav::-webkit-scrollbar { display: none; }
@media (min-width: 640px)  { .portal-nav { padding: 0 1.5rem; } }
@media (min-width: 768px)  { .portal-nav { padding: 0 2rem; } }

.portal-nav__tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;           /* WCAG touch target */
  padding: 0 1rem;
  font-family: var(--font-body);
  font-size: clamp(0.8125rem, 2vw, 0.9375rem);
  font-weight: 600;
  color: rgba(255,255,255,0.42);
  white-space: nowrap;
  cursor: pointer;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: none;
  transition: color 0.15s, border-color 0.15s;
}
@media (min-width: 640px) { .portal-nav__tab { padding: 0 1.25rem; } }
.portal-nav__tab.is-active {
  color: #fff;
  border-bottom-color: var(--brick);
}
.portal-nav__tab.is-disabled {
  color: rgba(255,255,255,0.22);
  cursor: not-allowed;
}
.tab-badge {
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.28);
  border-radius: 2rem;
  padding: 0.15rem 0.4rem;
}

/* ─── TAB PANELS ──────────────────────────────────────── */
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* ─── MAIN CONTENT WRAPPER ────────────────────────────── */
.portal-content {
  padding: 1.25rem 1.25rem 4rem;
  max-width: 1140px;
  margin-inline: auto;
  width: 100%;
}
@media (min-width: 640px)  { .portal-content { padding: 1.5rem 1.5rem 4rem; } }
@media (min-width: 768px)  { .portal-content { padding: 2rem 2rem 4rem; } }

/* ─── GREETING ─────────────────────────────────────────── */
.portal-greeting {
  margin-bottom: 1.375rem;
}
@media (min-width: 768px) { .portal-greeting { margin-bottom: 1.75rem; } }

.portal-greeting__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  background: linear-gradient(90deg, rgba(224,92,24,0.22), rgba(240,160,16,0.18));
  border: 1px solid rgba(240,160,16,0.32);
  border-radius: 2rem;
  padding: 0.3rem 0.875rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}
.portal-greeting__eyebrow::before {
  content: '';
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--gold);
}
.portal-greeting__heading {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.125rem);
  color: #fff;
  line-height: 1.15;
  margin-bottom: 0.375rem;
}
.portal-greeting__heading em { font-style: italic; color: var(--gold); }
.portal-greeting__sub {
  font-size: clamp(0.875rem, 2vw, 1rem);
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
}

/* ─── TWO-COLUMN GRID (Today tab) ─────────────────────── */
.portal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.125rem;
}
@media (min-width: 768px)  { .portal-grid { gap: 1.375rem; } }
@media (min-width: 1024px) { .portal-grid { grid-template-columns: 1fr 1fr; gap: 1.75rem; align-items: start; } }

/* ─── CARD — exact .lp-form-card pattern ──────────────── */
.portal-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-top: 3px solid var(--brick);
  border-radius: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}
.portal-card + .portal-card { margin-top: 1.25rem; }

.portal-card__hd {
  padding: 1.375rem 1.375rem 0;
}
@media (min-width: 640px) { .portal-card__hd { padding: 1.625rem 1.75rem 0; } }
.portal-card__label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
  margin-bottom: 0.3rem;
}
.portal-card__title {
  font-family: var(--font-display);
  font-size: clamp(1.1875rem, 3vw, 1.4375rem);
  color: #fff;
  line-height: 1.2;
}

.portal-card__bd {
  padding: 1.125rem 1.375rem 1.5rem;
}
@media (min-width: 640px) { .portal-card__bd { padding: 1.375rem 1.75rem 1.75rem; } }

/* ─── SUBJECT BADGE ───────────────────────────────────── */
.subject-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: 2rem;
  padding: 0.2rem 0.625rem;
  letter-spacing: 0.04em;
}
.subject-badge--english     { background: rgba(240,160,16,0.14); border: 1px solid rgba(240,160,16,0.28); color: var(--gold); }
.subject-badge--mathematics { background: rgba(224,92,24,0.14); border: 1px solid rgba(224,92,24,0.28); color: #F09060; }
.subject-badge--default     { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14); color: rgba(255,255,255,0.6); }

/* ─── REPORT STYLES ───────────────────────────────────── */
.report-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.report-meta__date {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.32);
}
.report-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 1.125rem 0;
}
.report-section-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  margin-bottom: 0.5rem;
}
.report-summary {
  font-size: clamp(0.875rem, 2vw, 0.9375rem);
  color: rgba(255,255,255,0.7);
  line-height: 1.75;
}
.report-keypoints {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5625rem;
}
.report-keypoints li {
  display: flex;
  align-items: flex-start;
  gap: 0.5625rem;
  font-size: clamp(0.8125rem, 1.8vw, 0.9rem);
  color: rgba(255,255,255,0.72);
  line-height: 1.55;
}
.report-keypoints li::before {
  content: '';
  display: block;
  width: 0.3125rem;
  height: 0.3125rem;
  border-radius: 50%;
  background: var(--brick);
  flex-shrink: 0;
  margin-top: 0.45rem;
}
.report-note {
  margin-top: 1.125rem;
  background: rgba(240,160,16,0.06);
  border: 1px solid rgba(240,160,16,0.16);
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.875rem 1rem;
}
.report-note__label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.75;
  margin-bottom: 0.4375rem;
}
.report-note__text {
  font-style: italic;
  font-size: clamp(0.875rem, 2vw, 0.9375rem);
  color: rgba(255,255,255,0.78);
  line-height: 1.65;
}

/* ─── CHAT STYLES ─────────────────────────────────────── */
.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  overflow-y: auto;
  padding-bottom: 0.25rem;
  max-height: 320px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
@media (min-width: 768px)  { .chat-messages { max-height: 380px; } }
@media (min-width: 1024px) { .chat-messages { max-height: 420px; } }
.chat-messages::-webkit-scrollbar { width: 3px; }
.chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  padding: 2rem 1rem;
  text-align: center;
}
.chat-empty__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(240,160,16,0.1);
  border: 1px solid rgba(240,160,16,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.chat-empty__icon svg { width: 1.125rem; height: 1.125rem; stroke: var(--gold); }
.chat-empty__text {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.3);
  line-height: 1.55;
  max-width: 22ch;
}
.chat-msg {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  max-width: 88%;
}
.chat-msg--student { align-self: flex-end; align-items: flex-end; }
.chat-msg--tutor   { align-self: flex-start; align-items: flex-start; }
.chat-msg__sender {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  padding: 0 0.25rem;
}
.chat-msg__bubble {
  padding: 0.6875rem 0.875rem;
  border-radius: var(--radius);
  font-size: clamp(0.8125rem, 2vw, 0.9rem);
  line-height: 1.6;
}
.chat-msg--student .chat-msg__bubble {
  background: linear-gradient(135deg, rgba(192,68,16,0.5), rgba(224,92,24,0.4));
  border: 1px solid rgba(224,92,24,0.28);
  color: #fff;
  border-bottom-right-radius: 0.2rem;
}
.chat-msg--tutor .chat-msg__bubble {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-left: 3px solid var(--gold);
  color: rgba(255,255,255,0.83);
  border-bottom-left-radius: 0.2rem;
}
.chat-typing {
  display: none;
  align-self: flex-start;
  align-items: center;
  gap: 0.3125rem;
  padding: 0.6875rem 0.875rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  border-bottom-left-radius: 0.2rem;
}
.chat-typing.is-visible { display: flex; }
.chat-typing__dot {
  width: 0.3125rem;
  height: 0.3125rem;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.3;
  animation: dot-pulse 1.2s ease-in-out infinite;
}
.chat-typing__dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing__dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot-pulse {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
  40%           { opacity: 1;   transform: scale(1); }
}
.chat-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 1rem 0 0.875rem;
}
.chat-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}
.chat-input {
  flex: 1;
  padding: 0.6875rem 0.875rem;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: clamp(0.875rem, 2vw, 0.9375rem);
  color: #fff;
  resize: none;
  line-height: 1.5;
  min-height: 2.75rem;
  max-height: 6.5rem;
  overflow-y: auto;
  scrollbar-width: none;
  transition: border-color 0.15s, background 0.15s;
}
.chat-input::-webkit-scrollbar { display: none; }
.chat-input::placeholder { color: rgba(255,255,255,0.25); }
.chat-input:focus { outline: none; border-color: var(--brick); background: rgba(255,255,255,0.1); }
.chat-input:disabled { opacity: 0.45; cursor: not-allowed; }

/* Send button — .lp-submit but icon-only */
.chat-send {
  flex-shrink: 0;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  background: linear-gradient(135deg, #C04410, var(--brick) 60%, #F09020);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(224,92,24,0.38);
  transition: opacity 0.15s, transform 0.1s;
}
.chat-send svg { width: 1rem; height: 1rem; stroke: #fff; }
.chat-send:hover  { opacity: 0.9; transform: translateY(-1px); }
.chat-send:active { opacity: 1; transform: none; }
.chat-send:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.chat-hint {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.22);
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* ─── SESSION LIST ─────────────────────────────────────── */
.sessions-wrap { display: flex; flex-direction: column; gap: 1.125rem; }

.sessions-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.875rem;
}
.sessions-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 3vw, 1.375rem);
  color: #fff;
}
.sessions-count {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
}

.session-list { display: flex; flex-direction: column; }

.session-row {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.9375rem 1.375rem;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  cursor: pointer;
  text-align: left;
  width: 100%;
  color: inherit;
  font-family: var(--font-body);
  min-height: 68px;             /* comfortable touch target */
  transition: background 0.12s;
}
.session-row:first-child { border-top: 1px solid rgba(255,255,255,0.06); }
.session-row:last-child  { border-bottom: none; }
.session-row:hover       { background: rgba(255,255,255,0.03); }
@media (min-width: 768px) {
  .session-row { padding: 0.875rem 1.75rem; min-height: 60px; }
}
.session-row__info { flex: 1; min-width: 0; }
.session-row__top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3125rem;
  flex-wrap: wrap;
}
.session-row__date {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.32);
}
.session-row__preview {
  font-size: clamp(0.8125rem, 1.8vw, 0.875rem);
  color: rgba(255,255,255,0.55);
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.session-row__arrow {
  flex-shrink: 0;
  color: rgba(255,255,255,0.2);
  transition: color 0.12s, transform 0.12s;
}
.session-row:hover .session-row__arrow {
  color: rgba(255,255,255,0.5);
  transform: translateX(2px);
}
.session-row__arrow svg { width: 1rem; height: 1rem; display: block; }

/* ─── SESSION DETAIL (inside Sessions tab) ────────────── */
.session-detail-wrap { display: flex; flex-direction: column; gap: 1.125rem; }
.session-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255,255,255,0.42);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  padding: 0.25rem 0;
  transition: color 0.15s;
  margin-bottom: 0.375rem;
}
.session-back-btn:hover { color: rgba(255,255,255,0.8); }
.session-back-btn svg { width: 0.875rem; height: 0.875rem; stroke: currentColor; }

/* ─── COMING SOON PLACEHOLDER ─────────────────────────── */
.coming-soon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  text-align: center;
  padding: 3.5rem 2rem;
}
.coming-soon-card__icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: rgba(240,160,16,0.1);
  border: 1px solid rgba(240,160,16,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.coming-soon-card__icon svg { width: 1.375rem; height: 1.375rem; stroke: var(--gold); }
.coming-soon-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: #fff;
}
.coming-soon-card p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.4);
  max-width: 28ch;
  line-height: 1.6;
}

/* ─── PARENT OVERVIEW ──────────────────────────────────── */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.125rem;
}
@media (min-width: 768px)  { .overview-grid { gap: 1.375rem; } }
@media (min-width: 1024px) { .overview-grid { grid-template-columns: 3fr 2fr; gap: 1.75rem; align-items: start; } }

.progress-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
@media (min-width: 640px) { .progress-stat-row { gap: 1rem; } }
.progress-stat {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.progress-stat__num {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 4vw, 1.75rem);
  color: #fff;
  line-height: 1;
}
.progress-stat__label {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.38);
  line-height: 1.4;
}

/* ─── PROGRESS CHART — grouped bars, first session vs most recent ──────── */
.progress-chart { width: 100%; }
.progress-chart__top-legend {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 1.375rem;
}
.progress-chart__legend-pill {
  display: flex;
  align-items: center;
  gap: 0.4375rem;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.65);
}
.progress-chart__swatch {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 0.1875rem;
  display: inline-block;
  flex-shrink: 0;
}
.progress-chart__swatch--first  { background: rgba(255,255,255,0.18); }
.progress-chart__swatch--latest { background: var(--gold); }

.progress-chart__bars {
  display: flex;
  align-items: stretch;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  overflow-x: auto;
}
.progress-chart__cluster { display: flex; flex-direction: column; flex-shrink: 0; }
.progress-chart__cluster-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.32);
  margin-bottom: 0.875rem;
}
.progress-chart__cluster-groups { display: flex; align-items: flex-end; gap: 0.875rem; flex: 1; }
.progress-chart__divider { width: 1px; flex-shrink: 0; background: rgba(255,255,255,0.08); }

.progress-chart__group {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 3.25rem;
}
.progress-chart__bar-pair {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0.3125rem;
  height: 7.5rem;
  width: 100%;
}
.progress-chart__bar {
  width: 1.125rem;
  border-radius: 0.25rem 0.25rem 0 0;
  position: relative;
  display: flex;
  justify-content: center;
}
.progress-chart__bar--first  { background: rgba(255,255,255,0.12); }
.progress-chart__bar--latest { background: var(--gold); }
.progress-chart__value {
  position: absolute;
  top: -1.25rem;
  font-size: 0.625rem;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
}
.progress-chart__value--latest { color: var(--gold); }
.progress-chart__delta {
  margin-top: 0.5rem;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #6FCF7C;
}
.progress-chart__group-label {
  margin-top: 0.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.75);
  text-align: center;
  line-height: 1.25;
}
@media (min-width: 640px) {
  .progress-chart__bars { gap: 1.5rem; }
  .progress-chart__cluster-groups { gap: 1.25rem; }
  .progress-chart__group { width: 3.75rem; }
  .progress-chart__bar-pair { height: 9rem; }
  .progress-chart__bar { width: 1.375rem; }
  .progress-chart__value { font-size: 0.6875rem; }
}

.parent-note {
  background: rgba(224,92,24,0.06);
  border: 1px solid rgba(224,92,24,0.18);
  border-left: 3px solid var(--brick);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 0.875rem 1rem;
  margin-top: 1.125rem;
}
.parent-note__label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brick);
  opacity: 0.8;
  margin-bottom: 0.4375rem;
}
.parent-note__text {
  font-size: clamp(0.875rem, 2vw, 0.9375rem);
  color: rgba(255,255,255,0.75);
  line-height: 1.65;
}
.parent-note p {
  font-size: clamp(0.875rem, 2vw, 0.9375rem);
  color: rgba(255,255,255,0.75);
  line-height: 1.65;
}
.parent-note__date {
  font-size: 0.6875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.28);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.parent-note__hint {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.22);
  margin-top: 1rem;
  line-height: 1.5;
}

/* ─── LOGIN PAGE ───────────────────────────────────────── */
.login-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1.25rem;
}
.login-inner {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.login-brand {
  text-align: center;
  margin-bottom: 2.5rem;
}
.login-brand__name {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 4vw, 1.5rem);
  color: var(--gold);
  letter-spacing: 0.02em;
}
.login-brand__sub {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.32);
  margin-top: 0.25rem;
}

.login-card {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-top: 3px solid var(--brick);
  border-radius: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 2rem 1.75rem 2.25rem;
}
@media (min-width: 640px) { .login-card { padding: 2.25rem 2.25rem 2.5rem; } }

.login-card__heading {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 4vw, 1.625rem);
  color: #fff;
  text-align: center;
  margin-bottom: 0.375rem;
}
.login-card__sub {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.42);
  text-align: center;
  margin-bottom: 1.75rem;
  line-height: 1.5;
}

/* Role selection cards */
.role-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.role-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6875rem;
  padding: 1.25rem 0.75rem;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 0.875rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  font-family: var(--font-body);
  color: rgba(255,255,255,0.65);
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
}
.role-card:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.2); }
.role-card.is-selected {
  background: rgba(224,92,24,0.14);
  border-color: var(--brick);
  color: #fff;
  transform: translateY(-1px);
}
.role-card__icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.role-card.is-selected .role-card__icon {
  background: rgba(224,92,24,0.2);
  border-color: rgba(224,92,24,0.4);
}
.role-card__icon svg { width: 1.25rem; height: 1.25rem; stroke: rgba(255,255,255,0.55); }
.role-card.is-selected .role-card__icon svg { stroke: #fff; }

/* Login form (appears after role selected) */
.login-form {
  display: none;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.07);
  animation: slide-down 0.22s ease;
}
.login-form.is-visible { display: flex; }
@keyframes slide-down {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.login-form__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  margin-bottom: 0.3rem;
  display: block;
}
.login-form input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  color: #fff;
  transition: border-color 0.15s, background 0.15s;
  -webkit-appearance: none;
}
.login-form input::placeholder { color: rgba(255,255,255,0.25); }
.login-form input:focus {
  outline: none;
  border-color: var(--brick);
  background: rgba(255,255,255,0.1);
}

/* Primary action button — same as .lp-submit */
.btn-primary {
  width: 100%;
  padding: 1rem 1.5rem;
  background: linear-gradient(100deg, #C04410 0%, var(--brick) 50%, #F09020 100%);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.015em;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  box-shadow: 0 4px 20px rgba(224,92,24,0.4);
  margin-top: 0.5rem;
}
.btn-primary:hover  { opacity: 0.92; transform: translateY(-1px); }
.btn-primary:active { opacity: 1; transform: none; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.login-proto-note {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.2);
  text-align: center;
  margin-top: 1.25rem;
  line-height: 1.5;
}
