/* FitOS Member Dashboard — placeholder / sign-in gating surface
   Surface tokens: Void bg (#0A0A0A), Bone text (#E7E2D6) — see theme.css :root */

/* ── Wrap ───────────────────────────────────────────── */
.dashboard-wrap {
  background: var(--bg);
  color: var(--bone);
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 120px var(--gutter) 0;
}

.dashboard-hero {
  padding-bottom: 80px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  text-align: center;
}

.dashboard-hero .brand-section {
  margin: 0 auto;
}

/* ── Sign-in card ───────────────────────────────────── */
.dashboard-signin {
  padding: 80px 0 60px;
}

.dashboard-empty-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 28px 32px 32px;
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.dashboard-empty-emoji {
  font-size: 56px;
  line-height: 1;
  color: var(--silver-dim);
  margin-bottom: 20px;
}

.dashboard-empty-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  color: var(--white);
  letter-spacing: -0.01em;
}

.dashboard-empty-desc {
  color: var(--silver-mid);
  font-size: 15px;
  line-height: 1.6;
  margin: 12px 0 24px;
}

.dashboard-cta-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.dashboard-membership {
  padding: 56px 0 28px;
}

.dashboard-membership-card {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 28px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
  overflow-wrap: anywhere;
}

.dashboard-membership-card.state-active {
  border-color: rgba(231,226,214,0.2);
}

.dashboard-membership-card.state-past-due,
.dashboard-membership-card.state-cancelled {
  border-color: rgba(166,69,43,0.3);
}

.dashboard-membership-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.dashboard-membership-heading {
  min-width: 0;
}

.dashboard-membership-eyebrow {
  color: var(--rust);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.dashboard-membership-heading h2 {
  color: var(--white);
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.dashboard-membership-fee {
  color: var(--silver-mid);
  font-size: 14px;
  margin-top: 6px;
}

.dashboard-membership-badge {
  flex: 0 0 auto;
  padding: 8px 12px;
  background: rgba(231,226,214,0.08);
  color: var(--bone);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.state-past-due .dashboard-membership-badge,
.state-cancelled .dashboard-membership-badge {
  background: rgba(166,69,43,0.18);
  color: var(--rust);
}

.state-pending .dashboard-membership-badge {
  background: rgba(231,226,214,0.05);
  color: var(--silver-mid);
}

.dashboard-membership-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.dashboard-membership-detail {
  min-width: 0;
}

.dashboard-membership-detail-label {
  display: block;
  color: var(--silver-dim);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.dashboard-membership-detail strong {
  display: block;
  color: var(--white);
  font-size: 15px;
  line-height: 1.4;
}

.dashboard-membership-detail p {
  color: var(--silver-mid);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 4px;
}

.dashboard-membership-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 20px;
}

.dashboard-membership-next-step {
  color: var(--silver-mid);
  font-size: 13px;
  line-height: 1.5;
  min-width: 0;
}

.dashboard-membership-next-step strong {
  color: var(--bone);
}

.dashboard-membership-action {
  flex: 0 0 auto;
  padding: 11px 16px;
  font-size: 11px;
  white-space: nowrap;
}

.dashboard-membership-empty {
  max-width: 560px;
}

/* ── Section anchors ─────────────────────────────────── */
.dashboard-section-anchor {
  background: var(--bg-card);
  border: 1px dashed rgba(231,226,214,0.18);
  padding: 32px 24px;
  color: var(--silver-mid);
  margin: 32px 0;
}

.dashboard-section-placeholder {
  font-size: 14px;
  color: var(--silver-dim);
  text-align: center;
  font-style: italic;
}

/* ── Founder sponsorship ───────────────────────────── */
.dashboard-sponsorship {
  border-style: solid;
  padding: 32px 24px;
}

.dashboard-sponsorship-card {
  max-width: 760px;
  margin: 0 auto;
  overflow-wrap: anywhere;
}

.dashboard-sponsorship-heading {
  margin-bottom: 28px;
}

.dashboard-sponsorship-heading h2,
.dashboard-sponsorship-card > h2 {
  color: var(--white);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.dashboard-sponsorship-heading .dashboard-sponsorship-guidance,
.dashboard-sponsorship-eligibility {
  color: var(--silver-mid);
  font-size: 14px;
  line-height: 1.6;
  margin-top: 10px;
  max-width: 620px;
}

.dashboard-form-field {
  margin-bottom: 20px;
  min-width: 0;
}

.dashboard-form-label {
  display: block;
  color: var(--bone);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.dashboard-form-input {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 13px 14px;
  background: var(--bg-alt);
  border: 1px solid var(--silver-dim);
  border-radius: 0;
  color: var(--bone);
  font: inherit;
  font-size: 16px;
  line-height: 1.4;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-form-textarea {
  min-height: 150px;
  resize: vertical;
}

.dashboard-form-input::placeholder {
  color: var(--silver-dim);
}

.dashboard-form-input:focus {
  outline: none;
  border-color: var(--bone);
  box-shadow: 0 0 0 2px rgba(231,226,214,0.12);
}

.dashboard-form-input[aria-invalid="true"] {
  border-color: var(--rust);
}

.dashboard-field-error {
  min-height: 21px;
  color: var(--rust);
  font-size: 13px;
  line-height: 1.5;
  padding-top: 5px;
}

.dashboard-sponsorship-actions {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-top: 4px;
}

.dashboard-sponsorship-submit:disabled {
  background: var(--silver-dim);
  color: var(--bg);
  cursor: wait;
  opacity: 1;
  transform: none;
}

.dashboard-form-status {
  flex: 1;
  min-height: 22px;
  color: var(--silver-mid);
  font-size: 14px;
  line-height: 1.5;
  padding-top: 12px;
}

.dashboard-form-status.is-error { color: var(--rust); }
.dashboard-form-status.is-success { color: var(--bone); }

.dashboard-sponsorship-confirmation {
  border: 1px solid rgba(231,226,214,0.2);
  padding: 28px;
  outline: none;
}

.dashboard-sponsorship-confirmation.is-recorded {
  border-color: rgba(231,226,214,0.34);
}

.dashboard-sponsorship-confirmation.is-existing {
  border-color: rgba(166,69,43,0.45);
}

.dashboard-sponsorship-confirmation:focus {
  border-color: var(--bone);
  box-shadow: 0 0 0 2px rgba(231,226,214,0.12);
}

.dashboard-sponsorship-confirmation h3 {
  color: var(--white);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.dashboard-sponsorship-confirmation-invitee {
  color: var(--bone);
  font-size: 16px;
  line-height: 1.5;
  margin-top: 14px;
}

.dashboard-sponsorship-confirmation-copy {
  color: var(--silver-mid);
  font-size: 14px;
  line-height: 1.6;
  margin-top: 8px;
  max-width: 620px;
}

.dashboard-sponsorship-again {
  margin-top: 24px;
}

.dashboard-sponsorship-recent {
  border-style: solid;
  padding: 28px 24px;
}

.dashboard-sponsorship-recent-heading,
.dashboard-sponsorship-request-list {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.dashboard-sponsorship-recent-heading {
  margin-bottom: 12px;
}

.dashboard-sponsorship-recent-heading h2 {
  color: var(--white);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.dashboard-sponsorship-status-link,
.dashboard-sponsorship-faq-link {
  display: inline-block;
  margin-top: 10px;
  color: var(--bone);
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.dashboard-sponsorship-faq-link {
  max-width: 100%;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.dashboard-sponsorship-status-link:hover,
.dashboard-sponsorship-faq-link:hover {
  color: var(--white);
}

.dashboard-sponsorship-status-link:focus-visible,
.dashboard-sponsorship-faq-link:focus-visible,
.member-sponsorship-status-actions .btn:focus-visible {
  outline: 2px solid var(--bone);
  outline-offset: 4px;
}

.dashboard-sponsorship-request-list {
  list-style: none;
  padding: 0;
}

.dashboard-sponsorship-request-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 14px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.member-sponsorship-status-wrap .dashboard-sponsorship-request-row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1.8fr) auto;
  align-items: start;
}

.dashboard-sponsorship-request-field {
  min-width: 0;
}

.dashboard-sponsorship-request-label {
  display: block;
  margin-bottom: 4px;
  color: var(--silver-dim);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dashboard-sponsorship-request-row strong {
  display: block;
  color: var(--bone);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.dashboard-sponsorship-request-time {
  color: var(--silver-mid);
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
}

.dashboard-sponsorship-request-status {
  display: inline-flex;
  justify-content: center;
  min-width: 78px;
  padding: 7px 10px;
  background: rgba(231,226,214,0.08);
  color: var(--bone);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.dashboard-sponsorship-request-status.is-accepted {
  background: rgba(231,226,214,0.14);
}

.dashboard-sponsorship-request-status.is-declined {
  background: rgba(166,69,43,0.18);
  color: var(--rust);
}

.dashboard-sponsorship-empty {
  max-width: 560px;
  margin-top: 20px;
  padding: 28px 24px;
  border-color: rgba(166,69,43,0.3);
}

.dashboard-sponsorship-empty .dashboard-empty-emoji {
  color: var(--rust);
  font-size: 36px;
  margin-bottom: 14px;
}

.dashboard-sponsorship-empty .dashboard-membership-eyebrow {
  margin-bottom: 8px;
}

.member-sponsorship-request-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}

.member-sponsorship-request-date {
  min-width: 0;
}

.member-sponsorship-request-date .dashboard-sponsorship-request-time {
  display: block;
  overflow-wrap: anywhere;
  white-space: normal;
}

.member-sponsorship-request-note {
  min-width: 0;
}

.member-sponsorship-request-note-text {
  margin: 0;
  color: var(--silver-mid);
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.member-sponsorship-status-state {
  max-width: 760px;
  margin: 20px auto 0;
  padding: 36px 24px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(231,226,214,0.04);
  text-align: center;
}

.member-sponsorship-status-state--error {
  border-color: rgba(166,69,43,0.45);
}

.member-sponsorship-status-state-indicator,
.member-sponsorship-status-state-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-bottom: 14px;
  border-radius: 50%;
}

.member-sponsorship-status-state-indicator {
  border: 2px solid rgba(231,226,214,0.24);
  border-top-color: var(--bone);
  animation: member-sponsorship-status-loading 0.9s linear infinite;
}

.member-sponsorship-status-state-mark {
  color: var(--rust);
  border: 1px solid rgba(166,69,43,0.45);
  font-size: 20px;
  font-weight: 700;
}

.member-sponsorship-status-state h3 {
  margin-bottom: 8px;
  color: var(--white);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.member-sponsorship-status-state-message {
  max-width: 480px;
  margin: 0 auto;
  color: var(--silver-mid);
  font-size: 14px;
  line-height: 1.5;
}

.member-sponsorship-status-retry {
  margin-top: 20px;
  padding: 11px 18px;
  border: 1px solid var(--rust);
  border-radius: 2px;
  background: var(--rust);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.member-sponsorship-status-retry:hover {
  background: var(--white);
  color: var(--ink);
}

.member-sponsorship-status-retry:focus-visible {
  outline: 2px solid var(--bone);
  outline-offset: 4px;
}

@keyframes member-sponsorship-status-loading {
  to { transform: rotate(360deg); }
}

.member-sponsorship-status-actions {
  max-width: 760px;
  margin: 24px auto 0;
}

/* ── Attendance ─────────────────────────────────────── */
.dashboard-attendance {
  border-style: solid;
  padding: 32px 24px;
}

.dashboard-attendance-heading {
  max-width: 760px;
  margin: 0 auto 20px;
}

.dashboard-attendance-heading h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
}

.dashboard-attendance-list {
  max-width: 760px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
}

.dashboard-attendance-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.dashboard-attendance-member,
.dashboard-attendance-type {
  min-width: 0;
}

.dashboard-attendance-label {
  display: block;
  margin-bottom: 4px;
  color: var(--silver-dim);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dashboard-attendance-row strong {
  display: block;
  color: var(--bone);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.dashboard-attendance-time {
  color: var(--silver-mid);
  font-size: 13px;
  line-height: 1.4;
  text-align: right;
  white-space: nowrap;
}

.dashboard-attendance-empty {
  max-width: 560px;
  padding: 28px 24px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ── Header greeting ─────────────────────────────────── */
.dash-greeting {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--silver-mid);
  margin-left: auto;
  margin-right: 12px;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 600px) {
  .dashboard-wrap {
    padding: 96px var(--gutter) 0;
  }

  .dashboard-hero { padding-bottom: 56px; }
  .dashboard-signin { padding: 56px 0 40px; }
  .dashboard-membership { padding: 40px 0 20px; }

  .dashboard-empty-card { padding: 40px 24px; }

  .dashboard-membership-card { padding: 22px 20px; }

  .dashboard-membership-header,
  .dashboard-membership-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-membership-badge {
    align-self: flex-start;
  }

  .dashboard-membership-details {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .dashboard-membership-action {
    width: 100%;
    justify-content: center;
    text-align: center;
    white-space: normal;
  }

  .dashboard-cta-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  .dashboard-cta-buttons .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .dashboard-attendance {
    padding: 28px 20px;
  }

  .dashboard-attendance-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
  }

  .dashboard-attendance-time {
    grid-column: 1 / -1;
    text-align: left;
    white-space: normal;
  }

  .dashboard-sponsorship {
    padding: 28px 20px;
  }

  .dashboard-sponsorship-heading h2,
  .dashboard-sponsorship-card > h2 {
    font-size: 24px;
  }

  .dashboard-sponsorship-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .dashboard-sponsorship-submit {
    width: 100%;
    justify-content: center;
  }

  .dashboard-sponsorship-confirmation {
    padding: 24px 20px;
  }

  .dashboard-sponsorship-again {
    width: 100%;
    justify-content: center;
  }

  .dashboard-sponsorship-recent {
    padding: 28px 20px;
  }

  .dashboard-sponsorship-recent-heading h2 {
    font-size: 22px;
  }

  .dashboard-sponsorship-recent-heading {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .dashboard-sponsorship-status-link {
    margin-top: 4px;
  }

  .dashboard-sponsorship-request-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .member-sponsorship-status-wrap .dashboard-sponsorship-request-row {
    grid-template-columns: 1fr;
  }

  .dashboard-sponsorship-request-time {
    white-space: normal;
  }

  .dashboard-sponsorship-request-status {
    justify-self: start;
  }

  .member-sponsorship-request-dates {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .member-sponsorship-status-actions .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .member-sponsorship-status-state {
    padding: 32px 20px;
  }

  .dashboard-form-status {
    padding-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .member-sponsorship-status-state-indicator {
    animation: none;
  }
}
