/* ============================================================
   DASHBOARD.CSS — Shared styles for dashboard, account, and tool forms
   Consolidates inline styles from dashboard.html, account.html,
   and the ros-form-field styles from research-optimisation-system.html
   ============================================================ */

/* ============================================================
   AUTH SCREEN (shared by dashboard.html and account.html)
   ============================================================ */
.dash-auth { max-width: 440px; margin: 0 auto; padding: var(--space-xl); }
.dash-auth__card { background: var(--bg-surface-primary); border: 1px solid var(--border-subtle-spec); border-radius: var(--spec-radius-lg); padding: var(--space-xl); box-shadow: var(--shadow-card-spec); }
.dash-auth__card--center { text-align: center; }
.dash-auth__title { font-family: 'Bitcount Prop Double', sans-serif; font-size: var(--type-display-md); font-weight: 350; letter-spacing: var(--type-display-md-tracking); margin-bottom: var(--space-xs); }
.dash-auth__subtitle { color: var(--text-secondary); font-size: var(--type-body-md); margin-bottom: var(--space-lg); }
.dash-auth__field { margin-bottom: var(--space-md); }
.dash-auth__field label { display: block; font-size: var(--type-caption); font-weight: 600; margin-bottom: 6px; color: var(--text-secondary); }
.dash-auth__field input { width: 100%; padding: 10px 14px; border-radius: var(--spec-radius-sm); border: 1px solid var(--border-subtle-spec); background: var(--bg-surface-secondary); color: var(--text-primary); font-size: var(--type-body-md); font-family: var(--font-sans); box-sizing: border-box; }
.dash-auth__field input:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(0,102,255,0.1); }
.dash-auth__error { color: var(--status-negative-text); font-size: var(--type-caption); margin-top: var(--space-sm); padding: 8px 12px; background: var(--status-negative-bg); border-radius: var(--spec-radius-sm); }
.dash-auth__success { color: var(--status-success-text); font-size: var(--type-caption); margin-top: var(--space-sm); padding: 8px 12px; background: var(--status-success-bg); border-radius: var(--spec-radius-sm); }
.dash-auth__toggle { text-align: center; margin-top: var(--space-md); font-size: var(--type-caption); color: var(--text-muted); }
.dash-auth__toggle a { color: var(--color-primary); cursor: pointer; text-decoration: none; font-weight: 600; }
.dash-auth__hint { font-size: var(--type-caption); color: var(--text-muted); margin-top: var(--space-sm); line-height: 1.5; }
.dash-auth__btn { margin-top: var(--space-md); }

/* ============================================================
   DASHBOARD SHELL — sidebar + content area
   ============================================================ */
.dash-container { max-width: var(--container-dashboard, 1200px); margin: 0 auto; padding-left: var(--container-gutter); padding-right: var(--container-gutter); }
.dash-main { padding-top: 100px; padding-bottom: 60px; }
.dash-section-header__title { font-family: 'Bitcount Prop Double', sans-serif; font-size: var(--text-h2); font-weight: 350; margin-bottom: 4px; }
.dash-section-header__subtitle { font-size: var(--text-body-md); color: var(--text-secondary); }
.dash-shell { display: flex; gap: var(--space-lg); max-width: var(--container-dashboard); margin: 0 auto; }
.dash-sidebar { width: 220px; flex-shrink: 0; position: sticky; top: 100px; align-self: flex-start; }
.dash-sidebar__nav { display: flex; flex-direction: column; gap: 2px; }
.dash-sidebar__link { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--spec-radius-sm); font-size: var(--type-body-md); font-weight: 500; color: var(--text-secondary); text-decoration: none; transition: background var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard); }
.dash-sidebar__link:hover { background: var(--bg-surface-secondary); color: var(--text-primary); }
.dash-sidebar__link.is-active { background: var(--bg-surface-secondary); color: var(--brand-coral); border-left: 3px solid var(--brand-coral); padding-left: 11px; }
.dash-sidebar__link svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.7; }
.dash-sidebar__link.is-active svg { opacity: 1; }
.dash-sidebar__divider { height: 1px; background: var(--border-subtle-spec); margin: var(--space-sm) 0; }
.dash-content { flex: 1; min-width: 0; }
.dash-tab { display: none; }
.dash-tab.is-active { display: block; }

/* ============================================================
   DASHBOARD CONTENT — header, quicklinks, items
   ============================================================ */
.dash-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-lg); flex-wrap: wrap; gap: var(--space-md); }
.dash-user { display: flex; align-items: center; gap: var(--space-sm); }
.dash-user__avatar { width: 36px; height: 36px; border-radius: var(--spec-radius-full); background: var(--brand-coral); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.dash-user__email { font-size: var(--type-body-md); font-weight: 600; }
.dash-user__label { font-size: var(--type-caption); color: var(--text-muted); }

.dash-quicklinks { display: flex; gap: var(--space-sm); flex-wrap: wrap; margin-bottom: var(--space-lg); }
.dash-kpi-row { margin-bottom: var(--space-lg); }
.dash-quicklink { padding: 10px 16px; border-radius: var(--spec-radius-sm); background: var(--bg-surface-primary); border: 1px solid var(--border-subtle-spec); font-size: var(--type-body-md); font-weight: 500; text-decoration: none; color: var(--text-primary); display: inline-flex; align-items: center; gap: 6px; transition: border-color var(--duration-fast) var(--ease-standard); }
.dash-quicklink:hover { border-color: var(--brand-coral); }

.dash-item { padding: var(--space-md); border-radius: var(--spec-radius-sm); background: var(--bg-surface-secondary); margin-bottom: var(--space-sm); border: 1px solid var(--border-subtle-spec); cursor: pointer; transition: border-color var(--duration-fast) var(--ease-standard); }
.dash-item:last-child { margin-bottom: 0; }
.dash-item:hover { border-color: var(--brand-coral); }
.dash-item__date { font-size: var(--type-caption); color: var(--text-muted); margin-bottom: 4px; }
.dash-item__title { font-size: var(--type-body-md); font-weight: 600; margin-bottom: 4px; }
.dash-item__meta { font-size: var(--type-caption); color: var(--text-secondary); display: flex; gap: var(--space-md); flex-wrap: wrap; }
.dash-item__score { font-weight: 700; color: var(--brand-coral); }
.dash-empty { text-align: center; padding: var(--space-xl); color: var(--text-muted); font-size: var(--type-body-md); }
.dash-empty a { color: var(--brand-coral); }

/* ============================================================
   DASHBOARD MODAL — full report viewer
   ============================================================ */
.dash-modal { position: fixed; inset: 0; z-index: 9999; display: none; align-items: flex-start; justify-content: center; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); padding: var(--space-xl) var(--space-md); overflow-y: auto; }
.dash-modal.is-open { display: flex; }
.dash-modal__panel { background: var(--bg-surface-primary); border: 1px solid var(--border-subtle-spec); border-radius: var(--spec-radius-lg); max-width: 800px; width: 100%; margin: var(--space-xl) auto; box-shadow: var(--shadow-card-spec); }
.dash-modal__header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-lg); border-bottom: 1px solid var(--border-subtle-spec); position: sticky; top: 0; background: var(--bg-surface-primary); border-radius: var(--spec-radius-lg) var(--spec-radius-lg) 0 0; z-index: 1; }
.dash-modal__title { font-family: 'Bitcount Prop Double', sans-serif; font-size: var(--type-display-sm); font-weight: 350; }
.dash-modal__close { background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 24px; padding: 4px 8px; line-height: 1; border-radius: var(--spec-radius-sm); }
.dash-modal__close:hover { color: var(--text-primary); background: var(--bg-surface-secondary); }
.dash-modal__body { padding: var(--space-lg); }
.dash-modal__scores { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-sm); margin-bottom: var(--space-lg); }
.dash-modal__score-card { text-align: center; padding: var(--space-md); border-radius: var(--spec-radius-sm); background: var(--bg-surface-secondary); border: 1px solid var(--border-subtle-spec); }
.dash-modal__score-num { font-size: 28px; font-weight: 800; }
.dash-modal__score-label { font-size: var(--type-caption); color: var(--text-secondary); margin-top: 4px; }
.dash-modal__section { margin-bottom: var(--space-lg); }
.dash-modal__section-title { font-size: var(--type-body-md); font-weight: 700; margin-bottom: var(--space-sm); color: var(--text-primary); }
.dash-modal__rec { padding: var(--space-md); border-radius: var(--spec-radius-sm); background: var(--bg-surface-secondary); border: 1px solid var(--border-subtle-spec); margin-bottom: var(--space-sm); }
.dash-modal__rec-header { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-sm); flex-wrap: wrap; }
.dash-modal__rec-badge { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: var(--spec-radius-sm); text-transform: uppercase; letter-spacing: 0.5px; }
.dash-modal__rec-badge--critical { background: var(--status-negative-bg); color: var(--status-negative-text); }
.dash-modal__rec-badge--high-risk { background: var(--status-warning-bg); color: var(--status-warning-text); }
.dash-modal__rec-badge--moderate { background: rgba(138,138,138,0.15); color: var(--text-secondary); }
.dash-modal__rec-badge--good { background: var(--status-success-bg); color: var(--status-success-text); }
.dash-modal__rec-badge--optimal { background: rgba(0,212,255,0.12); color: #00d4ff; }
.dash-modal__rec-title { font-weight: 600; }
.dash-modal__rec-trust { font-size: var(--type-caption); color: var(--text-muted); margin-left: auto; }
.dash-modal__rec-label { font-size: var(--type-caption); font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.dash-modal__rec-text { font-size: var(--type-body-sm); line-height: 1.6; margin-bottom: var(--space-sm); }
.dash-modal__rec-timeframe { display: inline-block; font-size: var(--type-caption); padding: 3px 10px; border-radius: var(--spec-radius-sm); background: rgba(0,102,255,0.08); color: var(--brand-coral); }
.dash-modal__talking-points { padding: var(--space-md); border-radius: var(--spec-radius-sm); background: rgba(0,102,255,0.04); border: 1px solid rgba(0,102,255,0.12); font-size: var(--type-body-sm); line-height: 1.7; }
.dash-modal__meta { display: flex; gap: var(--space-md); flex-wrap: wrap; margin-bottom: var(--space-lg); font-size: var(--type-caption); color: var(--text-secondary); }

/* ============================================================
   ACCOUNT PAGE — profile, preferences, session
   ============================================================ */
.account-page { max-width: 560px; margin: 0 auto; }
.account-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: var(--space-md); font-size: var(--type-body-md); color: var(--text-secondary); text-decoration: none; }
.account-back:hover { color: var(--brand-coral); }
.account-card { background: var(--bg-surface-primary); border: 1px solid var(--border-subtle-spec); border-radius: var(--spec-radius-lg); padding: var(--space-xl); }
.account-section { margin-bottom: var(--space-xl); }
.account-section:last-child { margin-bottom: 0; }
.account-section__title { font-family: 'Bitcount Prop Double', sans-serif; font-size: var(--type-body-lg); font-weight: 350; margin-bottom: var(--space-md); padding-bottom: var(--space-sm); border-bottom: 1px solid var(--border-subtle-spec); }
.account-row { display: flex; justify-content: space-between; align-items: center; padding: var(--space-sm) 0; font-size: var(--type-body-md); }
.account-row__label { color: var(--text-muted); font-weight: 500; }
.account-row__value { color: var(--text-primary); font-weight: 600; text-align: right; }
.account-avatar { display: flex; align-items: center; gap: var(--space-md); padding-bottom: var(--space-md); margin-bottom: var(--space-md); border-bottom: 1px solid var(--border-subtle-spec); }
.account-avatar__circle { width: 56px; height: 56px; border-radius: var(--spec-radius-full); background: var(--brand-coral); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 22px; flex-shrink: 0; }
.account-avatar__email { font-size: var(--type-body-lg); font-weight: 700; color: var(--text-primary); }
.account-avatar__status { font-size: var(--type-caption); color: var(--text-muted); }
.theme-toggle-row { display: flex; align-items: center; justify-content: space-between; padding: var(--space-sm) 0; }
.theme-toggle-row__label { font-size: var(--type-body-md); color: var(--text-primary); font-weight: 500; }
.theme-toggle-row__hint { font-size: var(--type-caption); color: var(--text-muted); margin-top: 2px; }

/* ============================================================
   TOOL FORM FIELDS — shared by facility-intake, research-optimisation
   ============================================================ */
.ros-form-field { margin-bottom: var(--space-lg); }
.ros-form-field__label { display: block; font-size: var(--type-body-md); font-weight: 600; color: var(--text-primary); margin-bottom: var(--space-xs); }
.ros-form-field__hint { font-size: var(--type-caption); color: var(--text-muted); margin-bottom: var(--space-xs); margin-top: 0; }
.ros-form-field__input, .ros-form-field__textarea, .ros-form-field__select { width: 100%; padding: var(--space-md) var(--space-lg); border: 2px solid var(--border-subtle-spec); border-radius: var(--spec-radius-sm); font-size: var(--type-body-md); font-family: var(--font-sans); background: var(--bg-surface-primary); color: var(--text-primary); transition: border-color var(--duration-fast) var(--ease-standard); box-sizing: border-box; }
.ros-form-field__input:focus, .ros-form-field__textarea:focus, .ros-form-field__select:focus { outline: none; border-color: var(--color-primary); }
.ros-form-field__textarea { min-height: 100px; resize: vertical; }

/* Form section groups — for organizing long forms into labeled sections */
.form-section { margin-bottom: var(--space-xl); }
.form-section:last-child { margin-bottom: 0; }
.form-section__header { display: flex; align-items: center; gap: var(--space-sm); margin-bottom: var(--space-md); padding-bottom: var(--space-sm); border-bottom: 1px solid var(--border-subtle-spec); }
.form-section__title { font-family: 'Bitcount Prop Double', sans-serif; font-size: var(--type-body-md); font-weight: 350; color: var(--text-primary); }
.form-section__icon { width: 28px; height: 28px; border-radius: var(--spec-radius-sm); display: flex; align-items: center; justify-content: center; background: rgba(0,102,255,0.06); color: var(--color-primary); flex-shrink: 0; }
.form-section__icon svg { width: 16px; height: 16px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md); }
@media (max-width: 640px) { .form-row-2 { grid-template-columns: 1fr; } }

/* Centered action button — for calculate/submit buttons in tool forms */
.action-center { text-align: center; margin-bottom: var(--space-xl); }
.action-center__btn { width: 100%; max-width: 400px; }

/* Dynamic equipment list — for facility intake equipment profile */
.equipment-row { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: var(--space-sm); margin-bottom: var(--space-sm); padding: var(--space-md); border: 1px solid var(--border-subtle-spec); border-radius: var(--spec-radius-sm); background: var(--bg-surface-secondary); align-items: end; }
.equipment-row__field { display: flex; flex-direction: column; gap: 4px; }
.equipment-row__label { font-size: var(--type-caption); font-weight: 600; color: var(--text-secondary); }
.equipment-row__input { width: 100%; padding: 8px 12px; border: 1px solid var(--border-subtle-spec); border-radius: var(--spec-radius-sm); font-size: var(--type-body-sm); font-family: var(--font-sans); background: var(--bg-surface-primary); color: var(--text-primary); box-sizing: border-box; }
.equipment-row__input:focus { outline: none; border-color: var(--color-primary); }
.equipment-row__select { width: 100%; padding: 8px 12px; border: 1px solid var(--border-subtle-spec); border-radius: var(--spec-radius-sm); font-size: var(--type-body-sm); font-family: var(--font-sans); background: var(--bg-surface-primary); color: var(--text-primary); box-sizing: border-box; }
.equipment-row__select:focus { outline: none; border-color: var(--color-primary); }
.equipment-row__remove { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 1px solid var(--border-subtle-spec); border-radius: var(--spec-radius-sm); background: var(--bg-surface-primary); color: var(--text-muted); cursor: pointer; transition: all var(--duration-fast) var(--ease-standard); flex-shrink: 0; }
.equipment-row__remove:hover { border-color: var(--color-error); color: var(--color-error); }
.equipment-empty { text-align: center; padding: var(--space-lg); color: var(--text-muted); font-size: var(--type-body-sm); border: 1px dashed var(--border-subtle-spec); border-radius: var(--spec-radius-sm); margin-bottom: var(--space-sm); }
@media (max-width: 640px) { .equipment-row { grid-template-columns: 1fr; } .equipment-row__remove { justify-self: end; } }
.tool-auth-inline { text-align: center; padding: var(--space-xl); background: var(--bg-surface-primary); border: 1px solid var(--border-subtle-spec); border-radius: var(--spec-radius-lg); margin: 0 auto var(--space-lg); max-width: 600px; box-shadow: var(--shadow-card-spec); }
.tool-auth-inline__title { font-family: 'Bitcount Prop Double', sans-serif; font-size: var(--text-h3); font-weight: 350; margin-bottom: var(--space-sm); }
.tool-auth-inline__desc { color: var(--text-secondary); font-size: var(--text-body-sm); margin-bottom: var(--space-md); }

/* Tool page container */
.tool-page { max-width: 640px; margin: 0 auto; padding-top: var(--space-xxl); padding-bottom: var(--space-xxl); }
.tool-page__back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: var(--space-md); font-size: var(--type-body-md); color: var(--text-secondary); text-decoration: none; }
.tool-page__back:hover { color: var(--brand-coral); }
.tool-page__title { font-family: 'Bitcount Prop Double', sans-serif; font-size: var(--type-display-md); font-weight: 350; margin-bottom: var(--space-xs); }
.tool-page__subtitle { font-size: var(--type-body-md); color: var(--text-secondary); margin-bottom: var(--space-xl); max-width: 56ch; }
.tool-page__card { background: var(--bg-surface-primary); border: 1px solid var(--border-subtle-spec); border-radius: var(--spec-radius-lg); padding: var(--space-xl); }
.tool-page__confirm { text-align: center; padding: var(--space-xl) 0; }
.tool-page__confirm h2 { color: #26C987; margin-bottom: var(--space-md); }
.tool-page__confirm p { color: var(--text-secondary); margin-bottom: var(--space-lg); }

/* Auth gate for tool pages */
.tool-auth-gate { text-align: center; padding: var(--space-xxl) 0; }
.tool-auth-gate h1 { font-family: 'Bitcount Prop Double', sans-serif; font-size: var(--type-display-md); font-weight: 350; margin-bottom: var(--space-xs); }
.tool-auth-gate p { color: var(--text-secondary); margin-bottom: var(--space-lg); }

/* ============================================================
   MOBILE — sidebar becomes horizontal scroll
   ============================================================ */
@media (max-width: 768px) {
  .dash-shell { flex-direction: column; gap: var(--space-md); }
  .dash-sidebar { width: 100%; position: relative; top: 0; }
  .dash-sidebar__nav {
    flex-direction: row; overflow-x: auto; gap: 4px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .dash-sidebar__nav::-webkit-scrollbar { display: none; }
  .dash-sidebar__link {
    white-space: nowrap; padding: 8px 12px;
    border-left: none !important; border-bottom: 2px solid transparent;
    font-size: var(--type-body-sm);
    gap: 6px;
  }
  .dash-sidebar__link svg { width: 16px; height: 16px; }
  .dash-sidebar__link.is-active { border-left: none; border-bottom: 2px solid var(--brand-coral); padding-left: 12px; }
  .dash-sidebar__divider { display: none; }
  .dash-modal__scores { grid-template-columns: repeat(2, 1fr); }
  .community-dash-grid { grid-template-columns: 1fr !important; }

  /* Dashboard header compact */
  .dash-header { margin-bottom: var(--space-md); }
  .dash-header h1 { font-size: var(--text-h3); }
  .dash-header p { font-size: var(--text-body-sm); }
  .dash-section-header__title { font-size: var(--text-h3); }
  .dash-section-header__subtitle { font-size: var(--text-body-sm); }
  .dash-main { padding-top: 72px; padding-bottom: var(--space-lg); }

  /* Quicklinks scroll horizontally */
  .dash-quicklinks {
    flex-wrap: nowrap; overflow-x: auto; gap: 6px;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .dash-quicklinks::-webkit-scrollbar { display: none; }
  .dash-quicklink { padding: 8px 12px; font-size: var(--type-body-sm); white-space: nowrap; flex-shrink: 0; }

  /* Auth screen compact */
  .dash-auth { padding: var(--space-md); max-width: 100%; }
  .dash-auth__card { padding: var(--space-lg); }
  .dash-auth__title { font-size: var(--text-h3); }
  .dash-auth__subtitle { font-size: var(--text-body-sm); margin-bottom: var(--space-md); }

  /* Modal compact */
  .dash-modal { padding: 0; }
  .dash-modal__panel { margin: 0; border-radius: 0; min-height: 100dvh; max-width: 100%; }
  .dash-modal__header { padding: var(--space-md); }
  .dash-modal__title { font-size: var(--text-h4); }
  .dash-modal__body { padding: var(--space-md); }
  .dash-modal__score-num { font-size: 22px; }
  .dash-modal__rec { padding: var(--space-sm); }
  .dash-modal__rec-text { font-size: var(--type-body-sm); }
  .dash-modal__talking-points { padding: var(--space-sm); font-size: var(--type-body-sm); }

  /* Tool form fields compact */
  .ros-form-field { margin-bottom: var(--space-md); }
  .ros-form-field__input, .ros-form-field__textarea, .ros-form-field__select {
    padding: 10px 14px; font-size: var(--type-body-sm);
  }
  .ros-form-field__textarea { min-height: 80px; }
  .ros-form-field__label { font-size: var(--type-body-sm); }
  .ros-form-field__hint { font-size: 12px; }

  /* Tool page compact */
  .tool-page { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }
  .tool-page__title { font-size: var(--text-h3); }
  .tool-page__subtitle { font-size: var(--text-body-sm); margin-bottom: var(--space-md); }
  .tool-page__card { padding: var(--space-md); }
  .tool-auth-inline { padding: var(--space-lg); }
  .tool-auth-inline__title { font-size: var(--text-h4); }

  /* Form sections compact */
  .form-section { margin-bottom: var(--space-lg); }
  .form-section__header { margin-bottom: var(--space-sm); padding-bottom: 6px; }
  .form-section__title { font-size: var(--type-body-sm); }

  /* Action buttons full-width */
  .action-center__btn { width: 100%; max-width: 100%; }

  /* Account page compact */
  .account-page { max-width: 100%; }
  .account-card { padding: var(--space-md); }
  .account-section { margin-bottom: var(--space-lg); }
  .account-section__title { font-size: var(--type-body-md); }
  .account-avatar__circle { width: 44px; height: 44px; font-size: 18px; }
  .account-avatar__email { font-size: var(--type-body-md); }
}

/* Extra small screens (< 480px) — even more compact */
@media (max-width: 479px) {
  .dash-auth__card { padding: var(--space-md); }
  .dash-modal__scores { grid-template-columns: 1fr 1fr; gap: 6px; }
  .dash-modal__score-card { padding: var(--space-sm); }
  .dash-modal__score-num { font-size: 20px; }
  .tool-page__card { padding: var(--space-sm); }
  .ros-form-field__input, .ros-form-field__textarea { padding: 10px 12px; }
}

/* ============================================================
   DASHBOARD FOOTER — compact, distinct from public footer
   ============================================================ */
.dash-footer {
  margin-top: var(--space-xxl);
  padding: var(--space-lg) var(--container-gutter);
  background: var(--bg-surface-secondary);
  border-top: 1px solid var(--border-subtle-spec);
}
.dash-footer__inner {
  max-width: var(--container-dashboard, 1200px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}
.dash-footer__brand {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  flex-wrap: wrap;
}
.dash-footer__brand .brand-font {
  font-size: 20px;
  font-weight: 350;
  letter-spacing: 0.03em;
  text-decoration: none;
  color: var(--text-primary);
}
.dash-footer__tagline {
  font-size: var(--text-caption);
  color: var(--text-muted);
}
.dash-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.dash-footer__link {
  font-size: var(--text-body-sm);
  color: var(--text-secondary);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: var(--spec-radius-sm);
  transition: background var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard);
}
.dash-footer__link:hover {
  background: var(--bg-surface-primary);
  color: var(--brand-coral);
}
.dash-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border-subtle-spec);
}
.dash-footer__bottom span {
  font-size: var(--text-caption);
  color: var(--text-muted);
}
.dash-footer__theme-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-subtle-spec);
  border-radius: var(--spec-radius-sm);
  background: var(--bg-surface-primary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard);
}
.dash-footer__theme-btn:hover {
  border-color: var(--brand-coral);
  color: var(--brand-coral);
}
.dash-footer__theme-btn .theme-toggle__icon { width: 16px; height: 16px; }
[data-theme="light"] .dash-footer__theme-btn .theme-toggle__sun { display: none; }
[data-theme="dark"] .dash-footer__theme-btn .theme-toggle__moon { display: none; }

/* Dashboard footer mobile */
@media (max-width: 767px) {
  .dash-footer { padding: var(--space-md) var(--container-gutter); }
  .dash-footer__inner { gap: var(--space-sm); }
  .dash-footer__brand { flex-direction: column; gap: 2px; }
  .dash-footer__nav { gap: 4px; }
  .dash-footer__link { padding: 6px 8px; font-size: var(--text-caption); }
  .dash-footer__bottom { flex-wrap: wrap; gap: var(--space-sm); }
}

/* ============================================================
   PROFILE EDIT FORM — shared form styles for profile-sync.js
   These classes are used by renderProfileEditForm() in
   js/profile-sync.js, which is loaded on both the dashboard
   (account.html) and the community (profile.html). The community
   has its own definitions in community/styles/community.css; these
   mirror them using the canonical --text-* tokens so the form
   looks consistent on the dashboard without loading the entire
   community stylesheet.
   ============================================================ */
.profile-edit-form {
  max-width: 560px;
}
.post-form__field { margin-bottom: var(--space-md); }
.post-form__label {
  display: block;
  font-size: var(--text-body-sm);
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.post-form__input,
.post-form__textarea,
.post-form__select {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--spec-radius-sm, 8px);
  border: 1px solid var(--border-subtle-spec, rgba(255,255,255,0.12));
  background: var(--bg-surface-secondary);
  color: var(--text-primary);
  font-size: var(--text-body-sm);
  font-family: inherit;
  transition: border-color 0.15s ease;
}
.post-form__input:focus,
.post-form__textarea:focus,
.post-form__select:focus {
  outline: none;
  border-color: var(--brand-coral, #FF6B6B);
}
.post-form__textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}
.post-form__hint {
  font-size: var(--text-caption);
  color: var(--text-muted);
  margin-top: 4px;
}

@media (max-width: 640px) {
  .post-form__field { margin-bottom: var(--space-sm); }
  .post-form__input, .post-form__textarea, .post-form__select {
    font-size: var(--text-caption);
    padding: 8px 10px;
  }
}
