/* ============================================================================
 * client-portal/shared  — File header, auth pages, forgot password, loading spinner + skeleton primitives.
 * ---------------------------------------------------------------------------
 * Extracted from the original monolithic client-portal.css during the
 * Feb 2026 refactor. Cascade order is preserved via index.css.
 * ========================================================================== */

/* ============================================================================
 * Client Portal Styles — Phase 1 Redesign (Token-Driven)
 * ============================================================================
 * All colors/radii/shadows now consume design tokens from design-tokens.css
 * so the dashboard adapts seamlessly to both light and dark themes.
 * Class names, layout, and DOM structure are preserved verbatim so all
 * existing functionality (badges, tabs, uploads, modals) continues to work.
 * ========================================================================== */

/* Auth Page */
.client-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--background);
  padding: 2rem;
}

.auth-container {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--elevation-4);
  border: 1px solid var(--border);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h1 {
  color: var(--text-primary);
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  background: var(--surface-elevated);
  padding: 0.25rem;
  border-radius: var(--radius-md);
}

.auth-tab {
  flex: 1 1;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background-color var(--motion-base) var(--easing-standard),
              color var(--motion-base) var(--easing-standard);
}

.auth-tab.active {
  background: var(--hhc-forest);
  color: #fff;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.auth-form label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
}

.auth-form input {
  padding: 0.875rem 1rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color var(--motion-base) var(--easing-standard);
}

.auth-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.auth-form input::placeholder {
  color: var(--text-muted);
}

.password-input-wrapper {
  position: relative;
}

.password-input-wrapper input {
  width: 100%;
  padding-right: 3rem;
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
}

.auth-message {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
}

.auth-message.error {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
}

.auth-message.success {
  background: color-mix(in srgb, var(--success) 12%, transparent);
  color: var(--success);
  border: 1px solid color-mix(in srgb, var(--success) 30%, transparent);
}

.auth-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--hhc-forest);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--motion-fast) var(--easing-standard),
              box-shadow var(--motion-base) var(--easing-standard),
              background-color var(--motion-base) var(--easing-standard);
  margin-top: 0.5rem;
}

.auth-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--elevation-3);
}

.auth-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-footer {
  margin-top: 1.5rem;
  text-align: center;
}

.auth-footer p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-switch-link {
  background: none;
  border: none;
  color: var(--info);
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: underline;
}

.back-home-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color var(--motion-base) var(--easing-standard);
}

.back-home-link:hover {
  color: var(--text-primary);
}

/* Forgot Password */
.forgot-password-link {
  text-align: right;
  margin-top: -0.5rem;
  margin-bottom: 0.5rem;
}

.forgot-password-link button {
  background: none;
  border: none;
  color: var(--info);
  font-size: 0.85rem;
  cursor: pointer;
  transition: color var(--motion-base) var(--easing-standard);
}

.forgot-password-link button:hover {
  color: var(--accent);
  text-decoration: underline;
}

.back-to-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: var(--info);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 0.5rem 0;
  transition: color var(--motion-base) var(--easing-standard);
}

.back-to-login-btn:hover {
  color: var(--accent);
}

/* Loading Spinner (legacy — new skeleton loaders preferred where possible) */
.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid color-mix(in srgb, var(--text-primary) 15%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-spinner.large {
  width: 40px;
  height: 40px;
  border-width: 3px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- Skeleton loader — modern replacement for spinners ---- */
.hhc-skeleton {
  display: block;
  background: linear-gradient(
    90deg,
    var(--surface-elevated) 0%,
    color-mix(in srgb, var(--surface-elevated) 60%, var(--border)) 50%,
    var(--surface-elevated) 100%
  );
  background-size: 200% 100%;
  animation: hhcSkeletonShimmer 1.6s linear infinite;
  border-radius: var(--radius-md);
  min-height: 1rem;
}

@keyframes hhcSkeletonShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hhc-skeleton { animation: none; }
}


/* ============================================================================
 * client-portal/upload  — Image upload section (photo/document upload zones + previews).
 * ---------------------------------------------------------------------------
 * Extracted from the original monolithic client-portal.css during the
 * Feb 2026 refactor. Cascade order is preserved via index.css.
 * ========================================================================== */

/* Image Upload Section Styles */
.image-upload-section {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 0.5rem;
}

.image-upload-section .section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.image-upload-section .section-description {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.image-upload-group {
  margin-bottom: 1.25rem;
}

.image-upload-group:last-of-type {
  margin-bottom: 1rem;
}

.image-upload-group label {
  display: block;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.image-upload-group label .required {
  color: var(--danger);
}

.upload-area {
  width: 100%;
}

.upload-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color var(--motion-base) var(--easing-standard),
              background-color var(--motion-base) var(--easing-standard),
              color var(--motion-base) var(--easing-standard);
  color: var(--text-muted);
}

.upload-placeholder:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  color: var(--text-primary);
}

.upload-placeholder span {
  font-size: 0.875rem;
}

.image-preview {
  position: relative;
  display: inline-block;
  width: 100%;
  max-width: 200px;
}

.image-preview img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 2px solid color-mix(in srgb, var(--accent) 50%, transparent);
}

.remove-image-btn {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 28px;
  height: 28px;
  background: var(--danger);
  border: 2px solid var(--surface);
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--motion-fast) var(--easing-standard);
}

.remove-image-btn:hover {
  transform: scale(1.1);
}

.permission-checkbox {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-text {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.auth-message.info {
  background: color-mix(in srgb, var(--info) 12%, transparent);
  color: var(--info);
  border: 1px solid color-mix(in srgb, var(--info) 30%, transparent);
}

.auth-message .spin {
  animation: spin 1s linear infinite;
}


/* ============================================================================
 * client-portal/layout  — Dashboard container, sidebar, main content, stats grid, quick actions, recent activity.
 * ---------------------------------------------------------------------------
 * Extracted from the original monolithic client-portal.css during the
 * Feb 2026 refactor. Cascade order is preserved via index.css.
 * ========================================================================== */

/* ==========================================================================
   Client Dashboard shell
   ========================================================================== */
.client-dashboard {
  display: flex;
  min-height: 100vh;
  background: var(--background);
  color: var(--text-primary);
}

.client-dashboard.loading,
.dashboard-loading {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--text-muted);
  min-height: 100vh;
  display: flex;
}

/* Sidebar */
.dashboard-sidebar {
  width: 280px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: 100vh;
  box-shadow: var(--elevation-1);
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--hhc-forest) 0%, #2E7F53 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--elevation-1);
}

.user-avatar .avatar-initials {
  font-family: 'Playfair Display', serif;
  font-family: var(--hhc-font-display, 'Playfair Display', serif);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  line-height: 1;
  -webkit-user-select: none;
          user-select: none;
}

.user-info h3 {
  color: var(--text-primary);
  font-size: 1rem;
  margin: 0;
  font-weight: 600;
}

.user-info p {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 0;
}

.sidebar-nav {
  flex: 1 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.875rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.925rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--motion-base) var(--easing-standard),
              color var(--motion-base) var(--easing-standard),
              border-color var(--motion-base) var(--easing-standard);
  text-align: left;
  width: 100%;
}

.nav-item:hover {
  background: var(--surface-elevated);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--hhc-forest);
  color: #fff;
  border-color: var(--hhc-forest);
  box-shadow: var(--elevation-1);
}

.nav-item.active svg {
  color: #fff;
}

.nav-item .badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-pill);
  min-width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
}

.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem;
  background: color-mix(in srgb, var(--danger) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent);
  border-radius: var(--radius-md);
  color: var(--danger);
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--motion-base) var(--easing-standard),
              border-color var(--motion-base) var(--easing-standard);
}

.logout-btn:hover {
  background: color-mix(in srgb, var(--danger) 18%, transparent);
  border-color: color-mix(in srgb, var(--danger) 45%, transparent);
}

/* Main Content */
.dashboard-main {
  flex: 1 1;
  padding: 2rem;
  overflow-y: auto;
  background: var(--background);
}

:where(.tab-content) h1 {
  /* Inherit color from parent so branded/gradient wrappers can override.
     Body sets color to var(--text-primary) which is the correct default. */
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.tab-description {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.add-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--hhc-forest);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--motion-fast) var(--easing-standard),
              box-shadow var(--motion-base) var(--easing-standard),
              background-color var(--motion-base) var(--easing-standard);
  box-shadow: var(--elevation-1);
}

.add-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--elevation-2);
  background: color-mix(in srgb, var(--hhc-forest) 88%, black);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-gap: 1rem;
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--elevation-1);
  transition: transform var(--motion-base) var(--easing-standard),
              box-shadow var(--motion-base) var(--easing-standard);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--elevation-2);
}

.stat-card svg {
  color: var(--hhc-forest);
}

.stat-card.highlight {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--hhc-forest) 15%, var(--surface)) 0%,
    var(--surface) 100%);
  border-color: color-mix(in srgb, var(--hhc-forest) 40%, transparent);
}

.stat-card.highlight svg {
  color: var(--accent);
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-value {
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

/* Quick Actions */
.quick-actions {
  margin-bottom: 2rem;
}

.quick-actions h2 {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--motion-base) var(--easing-standard),
              transform var(--motion-fast) var(--easing-standard),
              box-shadow var(--motion-base) var(--easing-standard);
  box-shadow: var(--elevation-1);
}

.action-btn:hover {
  border-color: var(--hhc-forest);
  transform: translateY(-1px);
  box-shadow: var(--elevation-2);
}

.action-btn.primary {
  background: var(--hhc-forest);
  border-color: transparent;
  color: #fff;
}

.action-btn.primary:hover {
  background: color-mix(in srgb, var(--hhc-forest) 88%, black);
}

/* Recent Activity */
.recent-activity h2 {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.activity-list {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--elevation-1);
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-item svg {
  color: var(--text-muted);
}

.activity-date {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.85rem;
}


/* ============================================================================
 * client-portal/tabs  — Check-In, Journal, Messages tab layouts.
 * ---------------------------------------------------------------------------
 * Extracted from the original monolithic client-portal.css during the
 * Feb 2026 refactor. Cascade order is preserved via index.css.
 * ========================================================================== */

/* Check-In Tab */
.checkin-iframe-container {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: var(--elevation-1);
}

.typeform-embed {
  width: 100%;
  height: 600px;
  border: none;
}

.checkin-history h2 {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.history-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--elevation-1);
}

.history-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  font-weight: 500;
}

.history-mood,
.history-energy {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0.25rem 0.75rem;
  background: var(--surface-elevated);
  border-radius: var(--radius-sm);
}

/* Journal Tab */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--elevation-1);
}

.empty-state svg {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.empty-state h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.empty-state p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.empty-state .empty-state-action {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.empty-state.empty-state--plain {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 2rem 1rem;
}

.no-data {
  color: var(--text-muted);
  font-style: italic;
}

.journal-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.journal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--elevation-1);
  transition: border-color var(--motion-base) var(--easing-standard),
              transform var(--motion-fast) var(--easing-standard),
              box-shadow var(--motion-base) var(--easing-standard);
}

.journal-card:hover {
  border-color: var(--hhc-forest);
  transform: translateY(-1px);
  box-shadow: var(--elevation-2);
}

.journal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 1rem;
}

.journal-header h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.journal-date {
  color: var(--text-muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.journal-preview {
  color: var(--text-muted);
  line-height: 1.6;
}

/* Messages Tab */
.messages-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--elevation-1);
}

.message-card.from-coach {
  border-left: 3px solid var(--info);
}

.message-card.from-me {
  border-left: 3px solid var(--success);
}

.message-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  gap: 0.5rem;
}

.message-from {
  color: var(--text-primary);
  font-weight: 600;
}

.message-date {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.message-subject {
  color: var(--text-primary);
  margin: 0 0 0.5rem;
  font-weight: 500;
}

.message-content {
  color: var(--text-muted);
  line-height: 1.6;
  white-space: pre-wrap;
}


/* ============================================================================
 * client-portal/referrals  — Referrals tab (stats grid, referral cards, invite modal).
 * ---------------------------------------------------------------------------
 * Extracted from the original monolithic client-portal.css during the
 * Feb 2026 refactor. Cascade order is preserved via index.css.
 * ========================================================================== */

/* Referrals Tab */
.referral-join {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}

.join-card {
  text-align: center;
  max-width: 500px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  box-shadow: var(--elevation-2);
}

.join-card svg {
  color: var(--hhc-forest);
  margin-bottom: 1rem;
}

.join-card h2 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-weight: 700;
}

.join-card > p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.benefits-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  text-align: left;
}

.benefits-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-primary);
  padding: 0.5rem 0;
}

.benefits-list li svg {
  color: var(--success);
}

.join-btn {
  padding: 1rem 2rem;
  background: var(--hhc-forest);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--motion-fast) var(--easing-standard),
              box-shadow var(--motion-base) var(--easing-standard),
              background-color var(--motion-base) var(--easing-standard);
}

.join-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--elevation-3);
  background: color-mix(in srgb, var(--hhc-forest) 88%, black);
}

.join-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.referral-dashboard {
  max-width: 800px;
}

.referral-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 1rem;
  gap: 1rem;
  margin-bottom: 2rem;
}

.referral-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--elevation-1);
}

.referral-stat svg {
  color: var(--hhc-forest);
  margin-bottom: 0.75rem;
}

.referral-stat .value {
  display: block;
  color: var(--text-primary);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
}

.referral-stat .label {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.referral-stat.highlight {
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--success) 15%, var(--surface)) 0%,
    var(--surface) 100%);
  border-color: color-mix(in srgb, var(--success) 45%, transparent);
}

.referral-stat.highlight svg {
  color: var(--success);
}

.referral-link-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--elevation-1);
}

.referral-link-section h2 {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.link-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface-elevated);
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

.link-box code {
  flex: 1 1;
  color: var(--info);
  font-size: 0.9rem;
  word-break: break-all;
  font-family: 'JetBrains Mono', 'SF Mono', ui-monospace, monospace;
}

.copy-btn {
  padding: 0.5rem 1rem;
  background: var(--hhc-forest);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--motion-base) var(--easing-standard);
}

.copy-btn:hover {
  background: color-mix(in srgb, var(--hhc-forest) 85%, black);
}

.link-code {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.link-code strong {
  color: var(--text-primary);
}


/* ============================================================================
 * client-portal/modal  — Generic modal styles used across the client dashboard.
 * ---------------------------------------------------------------------------
 * Extracted from the original monolithic client-portal.css during the
 * Feb 2026 refactor. Cascade order is preserved via index.css.
 * ========================================================================== */

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  animation: hhcModalFadeIn var(--motion-base) var(--easing-standard);
}

@keyframes hhcModalFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--elevation-4);
  animation: hhcModalScaleIn var(--motion-base) var(--easing-standard);
}

@keyframes hhcModalScaleIn {
  from { transform: scale(0.96); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  transition: color var(--motion-base) var(--easing-standard),
              background-color var(--motion-base) var(--easing-standard);
}

.close-btn:hover {
  color: var(--text-primary);
  background: var(--surface-elevated);
}

.modal-content form {
  padding: 1.5rem;
}

.modal-content .form-group {
  margin-bottom: 1.25rem;
}

.modal-content label {
  display: block;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.modal-content input,
.modal-content textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color var(--motion-base) var(--easing-standard),
              box-shadow var(--motion-base) var(--easing-standard);
}

.modal-content textarea {
  resize: vertical;
  min-height: 100px;
}

.modal-content input:focus,
.modal-content textarea:focus {
  outline: none;
  border-color: var(--hhc-forest);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hhc-forest) 18%, transparent);
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}

.modal-actions button {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--motion-base) var(--easing-standard),
              border-color var(--motion-base) var(--easing-standard),
              color var(--motion-base) var(--easing-standard);
}

.modal-actions button:first-child {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.modal-actions button:first-child:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.modal-actions button.primary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--hhc-forest);
  border: none;
  color: #fff;
  font-weight: 600;
}

.modal-actions button.primary:hover {
  background: color-mix(in srgb, var(--hhc-forest) 88%, black);
}

.modal-actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


/* ============================================================================
 * client-portal/photos  — Photos tab (grid, lightbox, uploader).
 * ---------------------------------------------------------------------------
 * Extracted from the original monolithic client-portal.css during the
 * Feb 2026 refactor. Cascade order is preserved via index.css.
 * ========================================================================== */

/* Photos Tab Styles */
.photos-tab {
  max-width: 1000px;
}

.photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  grid-gap: 1.5rem;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.photo-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--border);
  box-shadow: var(--elevation-1);
  transition: transform var(--motion-fast) var(--easing-standard),
              box-shadow var(--motion-base) var(--easing-standard);
}

.photo-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--elevation-2);
}

.photo-card h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.photo-display {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-elevated);
  margin-bottom: 1rem;
}

.uploaded-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.no-photo {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-muted);
}

.no-photo span {
  font-size: 0.875rem;
}

.photo-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.upload-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--hhc-forest);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--motion-base) var(--easing-standard),
              transform var(--motion-fast) var(--easing-standard);
}

.upload-btn:hover:not(:disabled) {
  background: color-mix(in srgb, var(--hhc-forest) 88%, black);
  transform: translateY(-1px);
}

.upload-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.upload-notice {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.4;
  margin: 0;
}

.upload-message {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}

.upload-message.error {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
}

.upload-message.success {
  background: color-mix(in srgb, var(--success) 12%, transparent);
  color: var(--success);
  border: 1px solid color-mix(in srgb, var(--success) 30%, transparent);
}

.permission-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--elevation-1);
}

.permission-section h3 {
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.permission-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0;
}

.permission-status .text-green {
  color: var(--success);
}

.permission-status .text-yellow {
  color: var(--warning);
}

.completion-notice {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1rem 1.5rem;
  background: color-mix(in srgb, var(--warning) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--warning) 30%, transparent);
  border-radius: var(--radius-lg);
  color: var(--warning);
}

.completion-notice strong {
  display: block;
  margin-bottom: 0.25rem;
}

.completion-notice p {
  margin: 0;
  color: var(--text-primary);
  font-size: 0.9rem;
  opacity: 0.9;
}


/* ============================================================================
 * client-portal/misc  — Avatar sidebar, badge variants, responsive tweaks.
 * ---------------------------------------------------------------------------
 * Extracted from the original monolithic client-portal.css during the
 * Feb 2026 refactor. Cascade order is preserved via index.css.
 * ========================================================================== */

/* Avatar Image in Sidebar */
.user-avatar .avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

/* Badge warning style */
.badge.warning {
  background: var(--warning);
  color: #fff;
}

/* Badge danger style — used for time-sensitive items (e.g. documents expiring
   in the next 30 days). Subtle pulse draws the eye without being noisy. */
.badge.danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 60%, transparent);
  animation: hhcBadgePulse 2.4s ease-out infinite;
}

@keyframes hhcBadgePulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 55%, transparent); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

@media (prefers-reduced-motion: reduce) {
  .badge.danger { animation: none; }
}

/* Responsive */
@media (max-width: 768px) {
  .client-dashboard {
    flex-direction: column;
  }

  .dashboard-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    box-shadow: var(--elevation-2);
  }

  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 0.5rem;
    gap: 0.25rem;
  }

  .nav-item {
    flex-direction: column;
    padding: 0.5rem;
    font-size: 0.75rem;
    min-width: 70px;
  }

  .nav-item svg {
    width: 18px;
    height: 18px;
  }

  .sidebar-footer {
    display: none;
  }

  .dashboard-main {
    padding: 1rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .referral-stats-grid {
    grid-template-columns: 1fr;
  }

  .action-buttons {
    flex-direction: column;
  }

  .action-btn {
    width: 100%;
    justify-content: center;
  }
}



/* ============================================================================
 * client-portal/chat  — Chat-style messaging (bubbles, input area, mobile responsive).
 * ---------------------------------------------------------------------------
 * Extracted from the original monolithic client-portal.css during the
 * Feb 2026 refactor. Cascade order is preserved via index.css.
 * ========================================================================== */

/* ============ Chat-Style Messaging ============ */

.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
  min-height: 500px;
  max-height: 800px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--elevation-2);
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, var(--hhc-forest) 0%, #2E7F53 100%);
  border-bottom: 1px solid var(--border);
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.coach-avatar {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.chat-header-info h2 {
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
}

.status-indicator {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
}

.chat-header .add-btn {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  box-shadow: none;
}

.chat-header .add-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: none;
}

.chat-messages {
  flex: 1 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--surface-elevated);
}

.chat-empty-state {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  padding: 2rem;
}

.chat-empty-state svg {
  color: var(--text-muted);
  margin-bottom: 1rem;
  opacity: 0.7;
}

.chat-empty-state h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.chat-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 18px;
  position: relative;
  word-wrap: break-word;
}

.chat-bubble.from-coach {
  align-self: flex-start;
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
  box-shadow: var(--elevation-1);
}

.chat-bubble.from-me {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--hhc-forest) 0%, #2E7F53 100%);
  color: white;
  border-bottom-right-radius: 4px;
  box-shadow: var(--elevation-2);
}

.chat-subject {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 6px;
  opacity: 0.9;
}

.chat-bubble.from-coach .chat-subject {
  color: var(--hhc-forest);
}

.chat-content {
  font-size: 0.95rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.chat-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 0.75rem;
  opacity: 0.7;
}

.chat-bubble.from-me .chat-meta {
  justify-content: flex-end;
}

.read-indicator {
  color: rgba(255, 255, 255, 0.9);
}

.chat-input-area {
  display: flex;
  gap: 12px;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.chat-input {
  flex: 1 1;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: 24px;
  font-size: 0.95rem;
  background: var(--surface-elevated);
  color: var(--text-primary);
  transition: all var(--motion-base) var(--easing-standard);
}

.chat-input:focus {
  outline: none;
  border-color: var(--hhc-forest);
  background: var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hhc-forest) 15%, transparent);
}

.chat-input::placeholder {
  color: var(--text-muted);
}

.chat-send-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--hhc-forest);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--motion-fast) var(--easing-standard),
              box-shadow var(--motion-base) var(--easing-standard),
              background-color var(--motion-base) var(--easing-standard);
  box-shadow: var(--elevation-2);
}

.chat-send-btn:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: var(--elevation-3);
  background: color-mix(in srgb, var(--hhc-forest) 88%, black);
}

.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Mobile responsiveness for chat */
@media (max-width: 768px) {
  .chat-container {
    height: calc(100vh - 160px);
    min-height: 400px;
    border-radius: var(--radius-lg);
  }

  .chat-header {
    padding: 0.75rem 1rem;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }

  .chat-header-info {
    justify-content: center;
  }

  .chat-header .add-btn {
    width: 100%;
    justify-content: center;
  }

  .chat-bubble {
    max-width: 85%;
  }

  .chat-messages {
    padding: 1rem;
  }

  .chat-input-area {
    padding: 0.75rem 1rem;
  }

  .chat-input {
    padding: 10px 14px;
  }

  .chat-send-btn {
    width: 44px;
    height: 44px;
  }
}

/* Client Portal — modular stylesheet.
 * Barrel that @imports each concern in the same order they were declared
 * in the original 1900-line client-portal.css, preserving cascade + specificity. */


/*# sourceMappingURL=316.cd0664e8.chunk.css.map*/