/* ========================================
   THE ALDER INDEX — Parent Portal  v2026-04-04c
   ======================================== */

/* ---- Loading ---- */
.portal-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.portal-loading__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-secondary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- Login Screen ---- */
.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--color-surface);
  padding: var(--space-6);
}

.login-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-10);
  max-width: 420px;
  width: 100%;
  text-align: center;
}

.login-card__logo {
  display: inline-block;
  margin-bottom: var(--space-6);
}

.login-card__title {
  font-family: var(--font-editorial);
  font-size: var(--text-2xl);
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.login-card__sub {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
}

.login-card__form {
  text-align: left;
}

.login-card__btn {
  width: 100%;
  margin-top: var(--space-4);
}

.login-card__sent {
  text-align: center;
}

.login-card__sent-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-4);
  background: var(--color-success-bg);
  color: var(--color-success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  font-weight: bold;
}

.login-card__sent h2 {
  font-size: var(--text-lg);
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.login-card__sent p {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-2);
}

.login-card__sent-note {
  font-size: var(--text-xs);
  color: var(--color-text-light);
}

.login-card__error {
  margin-top: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: var(--color-error-bg);
  color: var(--color-error);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}

.login-card__footer {
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-light);
}

.login-card__footer a {
  color: var(--color-text-secondary);
  text-decoration: none;
}

.login-card__footer a:hover {
  color: var(--color-secondary);
}

.login-card__switch {
  margin-top: var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  text-align: center;
}

.login-card__switch-link {
  background: none;
  border: none;
  color: var(--color-secondary);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  font-size: var(--text-sm);
  padding: 0;
  text-decoration: underline;
}

/* Right-aligned "Forgot password?" link below the password field */
.login-card__forgot {
  margin-top: calc(var(--space-2) * -1);
  margin-bottom: var(--space-4);
  text-align: right;
  font-size: var(--text-sm);
}

/* ---- Onboarding ---- */
.onboarding-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--color-surface);
  padding: var(--space-6);
}

.onboarding-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-10);
  max-width: 480px;
  width: 100%;
}

.onboarding-card__title {
  font-family: var(--font-editorial);
  font-size: var(--text-2xl);
  color: var(--color-primary);
  margin-bottom: var(--space-2);
}

.onboarding-card__sub {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-8);
}

.onboarding-card__btn {
  width: 100%;
  margin-top: var(--space-4);
}

/* ---- Form Elements ---- */
.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-2);
  margin-top: var(--space-5);
}

.form-label:first-child {
  margin-top: 0;
}

.form-label__link {
  font-weight: var(--weight-normal);
  font-size: var(--text-xs);
  color: var(--color-secondary);
  margin-left: var(--space-2);
  text-decoration: none;
}

.form-label__link:hover {
  text-decoration: underline;
}

/* ---- Inquiry Cards (parent portal) ---- */
.inq-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
}

.inq-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.inq-card__name {
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
}

.inq-card__practice {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.inq-card__contact-inline {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
  margin-top: 2px;
}

.inq-card__contact-inline a {
  color: var(--color-secondary);
  text-decoration: none;
}

.inq-card__contact-inline a:hover {
  text-decoration: underline;
}

.inq-card__contact-inline strong {
  color: var(--color-text);
  font-weight: var(--weight-semibold);
}

.inq-card__date {
  font-size: var(--text-xs);
  color: var(--color-text-light);
  margin-left: var(--space-2);
}

.inq-card__concern {
  font-size: var(--text-sm);
  color: var(--color-text);
  margin-bottom: var(--space-3);
}

.inq-card__section {
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
}

.inq-card__section:last-of-type {
  border-bottom: none;
}

.inq-card__section-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  color: var(--color-text-light);
  letter-spacing: 0.5px;
  margin-bottom: var(--space-1);
}

.inq-card__section-text {
  white-space: pre-line;
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.6;
}

.inq-card__batch {
  font-size: var(--text-xs);
  color: var(--color-text-light);
  font-style: italic;
}

.inq-card__note {
  font-size: var(--text-sm);
  color: var(--color-text-light);
  font-style: italic;
  margin-top: var(--space-3);
  padding: var(--space-3);
  background: var(--color-surface);
  border-radius: var(--radius-md);
}

.inq-card__response-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.inq-card__response {
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: rgba(42, 157, 143, 0.05);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-secondary);
}

.inq-card__response strong {
  font-size: var(--text-sm);
  color: var(--color-secondary-dark);
  display: block;
  margin-bottom: var(--space-2);
}

.inq-card__response p {
  font-size: var(--text-sm);
  color: var(--color-text);
  margin: 0;
}

.inq-card__contact {
  margin-top: var(--space-3);
  padding: var(--space-3);
  background: var(--color-success-bg);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}

.inq-card__contact strong {
  display: block;
  margin-bottom: var(--space-1);
}

.inq-card__contact p {
  margin: var(--space-1) 0;
}

.inq-card__decline {
  margin-top: var(--space-3);
  padding: var(--space-3);
  background: var(--color-surface);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.inq-card__actions {
  margin-top: var(--space-4);
  display: flex;
  gap: var(--space-3);
}

.form-required {
  color: var(--color-error);
}

.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  color: var(--color-text);
  transition: border-color var(--transition-fast);
  background: var(--color-bg);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.1);
}

.form-input:disabled {
  background: var(--color-surface);
  color: var(--color-text-secondary);
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--color-text-light);
  margin-top: var(--space-1);
}

.form-radio-group {
  display: flex;
  gap: var(--space-5);
  margin-top: var(--space-2);
  margin-bottom: var(--space-3);
}

.form-radio {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  cursor: pointer;
  color: var(--color-text);
}

.form-checkbox-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  cursor: pointer;
  color: var(--color-text);
}

.form-row {
  display: flex;
  gap: var(--space-4);
}

.form-row__col {
  flex: 1;
}

/* ---- Portal Layout ---- */
.portal {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 var(--space-6);
  background: var(--color-primary);
  color: white;
  flex-shrink: 0;
}

.portal-header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: white;
}

.portal-header__logo svg {
  width: 32px;
  height: 32px;
}

.portal-header__name {
  font-family: var(--font-editorial);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
}

.portal-header__right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.portal-header__user {
  font-size: var(--text-sm);
  opacity: 0.8;
}

.portal-header__signout {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.7);
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.portal-header__signout:hover {
  background: rgba(255,255,255,0.1);
  color: white;
}

.portal-layout {
  display: flex;
  flex: 1;
}

/* ---- Sidebar Nav ---- */
.portal-nav {
  width: 240px;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  padding: var(--space-4);
  flex-shrink: 0;
}

.portal-nav__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: all var(--transition-fast);
  margin-bottom: var(--space-1);
}

.portal-nav__item:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.portal-nav__item.is-active {
  background: rgba(42, 157, 143, 0.1);
  color: var(--color-secondary-dark);
  font-weight: var(--weight-semibold);
}

.portal-nav__item svg {
  width: 18px;
  height: 18px;
}

/* Unread-count pill for nav items (Batch 10 Part 1 Phase 3) */
.portal-nav__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  background: #E24B4A;
  color: #FFFFFF;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-body);
  line-height: 1;
}

/* ---- Main Content ---- */
.portal-main {
  flex: 1;
  padding: var(--space-8);
  max-width: 1100px;
}

.portal-section__title {
  font-family: var(--font-editorial);
  font-size: var(--text-2xl);
  color: var(--color-primary);
  margin-bottom: var(--space-6);
}

.portal-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.portal-section__header .portal-section__title {
  margin-bottom: 0;
}

/* ---- Empty States ---- */
.portal-empty {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  color: var(--color-text-secondary);
}

.portal-empty__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-4);
  color: var(--color-text-light);
}

.portal-empty p {
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

.portal-error {
  color: var(--color-error);
  font-size: var(--text-sm);
  padding: var(--space-4);
}

/* ---- Child Cards ---- */
.child-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-2);
  background: var(--color-bg);
  text-decoration: none;
  color: inherit;
  transition: border-color 150ms, box-shadow 150ms;
  cursor: pointer;
}

.child-card:hover {
  border-color: var(--color-secondary);
  box-shadow: 0 2px 8px rgba(42, 157, 143, 0.08);
}

.child-card__left {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-width: 0;
}

.child-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.child-card__text {
  min-width: 0;
}

.child-card__name {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
  margin: 0 0 2px;
  line-height: 1.3;
}

.child-card__age {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  margin: 0;
}

.child-card__meta {
  font-size: var(--text-xs);
  color: var(--color-text-light, #8a95a5);
  margin: 4px 0 0;
}

.child-card__arrow {
  font-size: 24px;
  color: var(--color-text-light, #8a95a5);
  flex-shrink: 0;
  margin-left: var(--space-3);
  transition: transform 150ms;
}

.child-card:hover .child-card__arrow {
  transform: translateX(3px);
  color: var(--color-secondary);
}

/* ---- Portal Practitioner Cards ---- */
.pp-card {
  border: 1px solid #e8ecf0;
  border-radius: 12px;
  background: #fff;
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.pp-card:hover {
  border-color: #d0d5db;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.pp-card__main {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
}

/* Initial square */
.pp-card__initial {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 8px;
  background: #1E3A5F;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.pp-card__initial span:first-child {
  font-family: var(--font-editorial);
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.pp-card__dot {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 3.5px;
  height: 3.5px;
  border-radius: 50%;
  background: #E9C46A;
}

.pp-card__photo {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Name + meta */
.pp-card__info {
  flex: 1;
  min-width: 0;
}

.pp-card__name {
  font-family: var(--font-editorial);
  font-size: 16px;
  font-weight: 700;
  color: #1E3A5F;
  line-height: 1.25;
  margin: 0;
}

.pp-card__service-type {
  font-size: 12px;
  font-weight: 500;
  color: #2A9D8F;
  margin-top: 1px;
  text-transform: capitalize;
}

.pp-card__service-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 8px;
  background: #e8f5f3;
  color: #2A9D8F;
  text-transform: capitalize;
  margin-top: 8px;
  line-height: 1.4;
}

.pp-card__meta-line {
  font-size: 12px;
  color: #8a95a5;
  margin-top: 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Action buttons */
.pp-card__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.pp-card__view-btn {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: #2A9D8F;
  padding: 6px 12px;
  border: 1px solid #e8ecf0;
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: background 150ms ease, border-color 150ms ease;
}

.pp-card__view-btn:hover {
  background: #e8f5f3;
  border-color: #2A9D8F;
}

.pp-card__inquiry-btn {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  padding: 4px 12px;
  border: none;
  border-radius: 6px;
  background: #2A9D8F;
  text-decoration: none;
  white-space: nowrap;
  transition: background 150ms ease;
}

.pp-card__inquiry-btn:hover {
  background: #238a7e;
  color: #fff;
}

.pp-card__remove-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border: none;
  border-radius: 6px;
  background: none;
  cursor: pointer;
  transition: background 150ms ease;
}

.pp-card__remove-btn:hover {
  background: #fef2f2;
}

/* Bottom strip */
.pp-card__strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 20px;
  background: #fafbfc;
  border-top: 1px solid #e8ecf0;
}

.pp-card__location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #8a95a5;
}

.pp-card__location svg {
  width: 13px;
  height: 13px;
  stroke: #8a95a5;
}

.pp-card__pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 8px;
  background: #e8f5f3;
  color: #2A9D8F;
  white-space: nowrap;
  text-transform: capitalize;
}

/* ---- Tags ---- */
.tag {
  display: inline-block;
  padding: 2px var(--space-2);
  background: var(--color-secondary-50);
  color: var(--color-secondary-dark);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  border-radius: var(--radius-full);
  text-transform: capitalize;
}

/* ---- Settings ---- */
.settings-form__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

.settings-saved {
  font-size: var(--text-sm);
  color: var(--color-success);
  font-weight: var(--weight-semibold);
}

.settings-section {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border-light);
}

.settings-section h3 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
  margin-bottom: var(--space-3);
}

.settings-section--danger {
  margin-top: var(--space-8);
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: var(--space-4);
}

.modal-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}

.modal-card--sm {
  max-width: 380px;
  text-align: center;
}

.modal-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.modal-card__header h2 {
  font-family: var(--font-editorial);
  font-size: var(--text-xl);
  color: var(--color-primary);
}

.modal-card__close {
  background: none;
  border: none;
  font-size: var(--text-2xl);
  color: var(--color-text-light);
  cursor: pointer;
  padding: var(--space-1);
  line-height: 1;
}

.modal-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.btn--danger {
  background: var(--color-error);
  color: white;
}

.btn--danger:hover {
  background: #dc2626;
}

.btn--danger-text {
  color: var(--color-error) !important;
}

/* ---- Mobile Bottom Nav ---- */
.portal-mobile-nav {
  display: none;
}

/* Phase 6A / CHROME-001 — defensive overflow guards on the portal
   content column. If a rendered page contains a stat card or
   conversation row with a fixed min-width, the legacy body's
   `overflow-x: hidden` masked it but the content still over-ran the
   viewport at xs/sm (measured 504 / 579 in Phase 2 audit). These
   rules cap the shell and the content column to the available width
   so any inner component that still overflows scrolls within its own
   container instead of shoving the shell wide. */
.portal-main {
  max-width: 100%;
  min-width: 0;
}
.portal-layout {
  /* Prevent the flex layout from stretching past its container when a
     child has an intrinsic content width larger than the viewport. */
  min-width: 0;
  max-width: 100%;
}

/* ---- Mobile Responsive ---- */
@media (max-width: 768px) {
  .portal-nav {
    display: none;
  }

  .portal-mobile-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    /* Phase 6A / CHROME-006: 60 → 64 min-height so each tab's
       vertical tap area clears the 44px touch-target rule with 10px
       padding top and bottom. iOS home-indicator safe area is
       respected via padding-bottom: env(...) below. */
    min-height: 64px;
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
  }

  .portal-mobile-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    color: var(--color-text-light);
    text-decoration: none;
    padding: var(--space-1);
    min-width: 44px;
  }

  .portal-mobile-nav__item svg {
    width: 20px;
    height: 20px;
  }

  .portal-mobile-nav__item.is-active {
    color: var(--color-secondary);
  }

  .portal-mobile-nav__icon-wrap {
    position: relative;
    display: inline-flex;
    line-height: 0;
  }

  .portal-mobile-nav__badge {
    position: absolute;
    top: -4px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #E24B4A;
    color: #FFFFFF;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
    text-align: center;
    box-sizing: border-box;
    pointer-events: none;
  }

  .portal-main {
    padding: var(--space-5) var(--space-4);
    /* Phase 6A / CHROME-006: tab bar bumped from 60 to 64 min-height,
       plus iOS home-indicator safe area. 64 bar + 24 gutter + safe-area
       inset keeps the last content row clear of the bar on every
       phone form factor. */
    padding-bottom: calc(64px + 24px + env(safe-area-inset-bottom));
  }

  /* Phase 6A / CHROME-003: Sign-out button moves out of the header at
     xs / sm — it's still available in the Settings tab (see portal.js
     renderSettings + dashboard.js renderSettings). Frees header real
     estate for the bell + hamburger. */
  .nav__link--signout {
    display: none !important;
  }

  .portal-header__user {
    display: none;
  }

  .login-card, .onboarding-card {
    padding: var(--space-6);
  }

  .form-checkbox-group {
    grid-template-columns: 1fr;
  }

  .pp-card__main {
    padding: 12px 14px;
    gap: 10px;
  }

  .pp-card__strip {
    padding: 8px 14px;
  }

  .pp-card__view-btn {
    font-size: 11px;
    padding: 5px 10px;
  }

  .child-card__avatar {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
}

/* ============================================================
   Phase 6A / CHROME-002 — Portal chrome at md+ (768–1023)
   Placed AFTER the @media (max-width: 768px) block above so at exactly
   768 source order lets this rule win (both media queries apply at
   768; the later selector set in source wins). Ships a single
   navigation pattern at md — sidebar only, no mobile tab bar, no
   hamburger — instead of the audit's triply-redundant chrome.
   ============================================================ */
@media (min-width: 768px) {
  .portal-nav { display: block; }
  .portal-mobile-nav { display: none; }
  /* `!important` overrides css/responsive.css's `@media (max-width: 768px)
     .header__menu-btn { display: flex }` which ALSO applies at 768 and
     is loaded after portal.css (so it wins without !important). Scoped
     to the portal via portal.css load path — public pages still use the
     responsive.css rule at md. */
  .header__menu-btn { display: none !important; }
  .portal-header__user { display: inline-flex; }
  /* Undo the mobile tab-bar bottom padding so the footer sits at the
     natural document bottom at md+ where no tab bar is rendered. */
  .portal-main { padding-bottom: var(--space-8); }
  /* Sign-out returns to the header at md+ (hidden in the max-width
     767 block above). */
  .nav__link--signout { display: inline-flex !important; }
}

/* ============================================================
   Conversation View (Inquiry Messaging — Module 1)
   ============================================================ */

/* Inquiry list item — clickable row */
.inq-card--conversation {
  cursor: pointer;
  transition: background 0.15s;
}
.inq-card--conversation:hover {
  background: var(--color-surface);
}
.inq-card--conversation .inq-card__chevron {
  font-size: 1.3rem;
  color: var(--color-text-light);
  margin-left: var(--space-2);
}

/* Unread badge */
.conv-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-secondary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  padding: 0 6px;
  margin-right: var(--space-2);
}

/* Child name chip on dashboard inquiry cards */
.inq-card__child-name {
  color: var(--color-text-light);
  font-size: 0.85rem;
  margin-left: var(--space-2);
}

/* ====================================================
   CONVERSATION VIEW — Redesigned 2026-03-31
   Full-height flex column: header → toggle → cards → chat → input
   ==================================================== */

/* ---- Container ---- */
.conv {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 400px;
  background: #f4f5f7;
  font-family: 'DM Sans', var(--font-body), sans-serif;
}

/* ---- Header ---- */
.conv__header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
  padding: 10px 16px;
}

.conv__header-row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.conv__back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: #2A9D8F;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}
.conv__back-btn:hover { opacity: 0.8; }

.conv__status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 10px;
  font-weight: 600;
}
.conv__status-badge .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
.conv__status-badge--pending   { background: #fdf6e3; color: #92600A; }
.conv__status-badge--pending .dot { background: #E9C46A; }
.conv__status-badge--active    { background: #e3f2fd; color: #1565c0; }
.conv__status-badge--active .dot { background: #42a5f5; }
.conv__status-badge--confirmed { background: #e8f5f3; color: #228176; }
.conv__status-badge--confirmed .dot { background: #2A9D8F; }
.conv__status-badge--closed    { background: #f3f4f6; color: #6b7280; }
.conv__status-badge--closed .dot { background: #9ca3af; }

.conv__header-cards {
  display: flex;
  gap: 10px;
}

.conv__mini-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #f9fafb;
  border-radius: 8px;
}

.conv__mini-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
  font-size: 11px;
}
.conv__mini-avatar--child {
  background: #2A9D8F;
  color: #fff;
}
.conv__mini-avatar--prac {
  background: #1E3A5F;
  color: #E9C46A;
  font-family: 'Playfair Display', serif;
  font-size: 10px;
  font-weight: 700;
}
.conv__mini-avatar--parent {
  background: #2A9D8F;
  color: #fff;
}

.conv__mini-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
}

.conv__mini-name {
  font-size: 13px;
  font-weight: 600;
  color: #1E3A5F;
}
.conv__mini-name .age {
  font-weight: 400;
  color: #6b7280;
}

/* ---- Section Toggle Bar ---- */
.conv__section-toggle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  user-select: none;
}
.conv__section-toggle:hover {
  background: #fafafa;
}
.conv__toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #1E3A5F;
}
.conv__toggle-chevron {
  transition: transform 0.2s;
  color: #9ca3af;
}
.conv__toggle-chevron.open {
  transform: rotate(180deg);
}

/* ---- Expandable Cards Region ---- */
.conv__cards-region {
  flex-shrink: 0;
  padding: 10px 16px 6px;
  background: #f4f5f7;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-bottom: 1px solid #e5e7eb;
}

/* Shared collapsible card */
.conv__card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.conv__card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  cursor: pointer;
}
.conv__card-header:hover { background: #fafafa; }
.conv__card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.conv__card-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.conv__card-dot--teal { background: #2A9D8F; }
.conv__card-dot--gold { background: #E9C46A; }
.conv__card-title {
  font-size: 12px;
  font-weight: 600;
  color: #1E3A5F;
  white-space: nowrap;
}
.conv__card-subtitle {
  font-size: 11px;
  color: #9ca3af;
  white-space: nowrap;
}
.conv__card-chevron {
  flex-shrink: 0;
  transition: transform 0.2s;
  color: #9ca3af;
}
.conv__card-chevron.open {
  transform: rotate(180deg);
}

.conv__card-collapsed {
  padding: 0 14px 10px;
  font-size: 12px;
  color: #4b5563;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conv__card-body {
  border-top: 1px solid #f3f4f6;
  padding: 12px 14px;
  background: #f9fafb;
  max-height: 260px;
  overflow-y: auto;
}
.conv__card-body--inquiry {
  max-height: 220px;
}

/* Card detail grid */
.conv__card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
  margin-bottom: 12px;
}
.conv__card-field-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  margin-bottom: 2px;
}
.conv__card-field-value {
  font-size: 13px;
  font-weight: 500;
  color: #1f2937;
}

/* Specialty tags */
.conv__tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  background: #e8f5f3;
  color: #228176;
  margin: 0 5px 5px 0;
}

/* Approach block */
.conv__approach {
  font-size: 13px;
  line-height: 1.6;
  color: #4b5563;
  padding: 8px 10px;
  background: #fff;
  border-radius: 6px;
  border-left: 3px solid #2A9D8F;
  font-style: italic;
}

/* Message block in inquiry card */
.conv__inquiry-message {
  font-size: 13px;
  line-height: 1.6;
  color: #4b5563;
  padding: 8px 10px;
  background: #fff;
  border-radius: 6px;
  border-left: 3px solid #E9C46A;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Card footer link */
.conv__card-link {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 500;
  color: #2A9D8F;
  cursor: pointer;
  text-decoration: none;
}
.conv__card-link:hover { text-decoration: underline; }

/* ---- Contact card (shown after mutual confirmation) ---- */
.conv__contact-card {
  background: #e8f5f3;
  border: 1px solid #2A9D8F;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0;
}
.conv__contact-title {
  font-weight: 700;
  color: #1E3A5F;
  margin-bottom: 6px;
  font-size: 0.9rem;
}
.conv__contact-row {
  font-size: 0.9rem;
  margin-bottom: 3px;
}
.conv__contact-row a {
  color: #2A9D8F;
}

/* ---- Message thread ---- */
.conv__thread {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 150px;
  background: #f4f5f7;
}

.conv__loading,
.conv__empty,
.conv__error {
  text-align: center;
  color: #9ca3af;
  padding: 32px 0;
  font-size: 0.9rem;
}
.conv__error { color: #d64545; }

/* Date dividers */
.conv__date-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}
.conv__date-divider::before,
.conv__date-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}
.conv__date-label {
  font-size: 10px;
  font-weight: 500;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* Sender label */
.conv__sender-label {
  font-size: 10px;
  font-weight: 600;
  margin-bottom: 2px;
  margin-top: 6px;
}
.conv__sender-label--me {
  text-align: right;
  color: #6b7280;
}
.conv__sender-label--them {
  text-align: left;
  color: #228176;
}

/* Message bubbles */
.conv__msg {
  display: flex;
  flex-direction: column;
  max-width: 78%;
  margin-bottom: 4px;
}
.conv__msg--me {
  align-self: flex-end;
}
.conv__msg--them {
  align-self: flex-start;
}
.conv__msg--system {
  align-self: center;
  max-width: 90%;
}

.conv__msg-row {
  display: flex;
  align-items: flex-end;
  gap: 5px;
}
.conv__msg--me .conv__msg-row {
  flex-direction: row-reverse;
}

.conv__msg-bubble {
  padding: 9px 14px;
  font-size: 14px;
  line-height: 1.5;
}

.conv__msg--me .conv__msg-bubble {
  background: #1E3A5F;
  color: rgba(255,255,255,0.95);
  border-radius: 16px 4px 16px 16px;
}

.conv__msg--them .conv__msg-bubble {
  background: #fff;
  color: #1f2937;
  border-radius: 4px 16px 16px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.conv__msg--system .conv__msg-body {
  background: #fff;
  border: 1px dashed #e5e7eb;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: #6b7280;
  text-align: center;
}

/* Read tick icon */
.conv__read-tick {
  flex-shrink: 0;
  margin-bottom: 2px;
}

/* Timestamps */
.conv__msg-time {
  font-size: 10px;
  color: #9ca3af;
  margin-top: 2px;
}
.conv__msg--me .conv__msg-time {
  text-align: right;
  padding-left: 19px;
}
.conv__msg--system .conv__msg-time {
  text-align: center;
}

/* ---- Input area ---- */
.conv__input-area {
  padding: 12px 16px 16px;
  background: #fff;
  border-top: 1px solid #f3f4f6;
  flex-shrink: 0;
}
.conv__compose {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  background: #f9fafb;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  padding: 4px 4px 4px 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.conv__compose:focus-within {
  border-color: #2A9D8F;
  box-shadow: 0 0 0 3px rgba(42,157,143,0.06);
}

.conv__input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: 'DM Sans', var(--font-body), sans-serif;
  font-size: 14px;
  color: #1f2937;
  resize: none;
  padding: 9px 0;
  line-height: 1.5;
  outline: none;
  min-height: 24px;
  max-height: 120px;
}
.conv__input::placeholder { color: #9ca3af; }

.conv__send-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #2A9D8F;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}
.conv__send-btn:hover { background: #228176; }
.conv__send-btn:disabled { background: #9ca3af; cursor: default; }
.conv__send-btn svg { pointer-events: none; }

.conv__footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  padding: 0 2px;
}

.conv__compose-hint {
  font-size: 10px;
  color: #9ca3af;
}

/* ---- Attachment button & preview ---- */
.conv__attach-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 8px;
  color: #6b7280;
  transition: color 0.15s, background 0.15s;
}
.conv__attach-btn:hover {
  color: #2A9D8F;
  background: #f0faf8;
}

.conv__attachment-preview {
  padding: 6px 12px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}
.conv__staged-file {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #374151;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 6px 10px;
}
.conv__staged-icon { font-size: 1.1rem; }
.conv__staged-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.conv__staged-size { color: #9ca3af; font-size: 0.75rem; }
.conv__staged-remove {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #9ca3af;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.conv__staged-remove:hover { color: #ef4444; }

/* ---- Message attachment ---- */
.conv__msg-attachment {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(0,0,0,0.06);
  font-size: 0.82rem;
}
.conv__msg-attach-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
  text-decoration: none;
  font-weight: 500;
}
.conv__msg-attach-link:hover { text-decoration: underline; }
.conv__msg-attach-icon { font-size: 1rem; }
.conv__msg-attach-uploading {
  color: #9ca3af;
  font-style: italic;
  font-weight: 400;
}

.conv__close-link {
  font-size: 11px;
  color: #9ca3af;
  cursor: pointer;
  background: none;
  border: none;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.conv__close-link:hover {
  color: #c0392b;
  background: #fef2f2;
}

/* ---- Closed notice ---- */
.conv__closed-notice {
  text-align: center;
  padding: 16px;
  color: #6b7280;
  font-size: 0.9rem;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

/* ---- Action buttons area ---- */
.conv__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 16px;
  flex-wrap: wrap;
}

.conv__batch-banner {
  border-radius: 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  overflow: hidden;
}
.conv__batch-inner {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.conv__batch-text {
  font-size: 13px;
  color: #374151;
  line-height: 1.5;
}
.conv__batch-text strong {
  color: #166534;
}
.conv__batch-actions {
  display: flex;
  gap: 8px;
}
.conv__batch-actions .btn--outline {
  background: transparent;
  border: 1px solid #d1d5db;
  color: #6b7280;
}
.conv__batch-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 2px;
}
.conv__batch-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #374151;
}
.conv__batch-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2A9D8F;
  cursor: pointer;
  flex-shrink: 0;
}
.conv__batch-item a {
  color: #1E3A5F;
  font-weight: 600;
  text-decoration: none;
}
.conv__batch-item a:hover {
  text-decoration: underline;
  color: #2A9D8F;
}
.conv__batch-item .conv__batch-practice {
  color: #6b7280;
  font-size: 12px;
}

.conv__begin-prompt {
  background: #F0FAF8;
  border: 1px solid #B2DFDB;
  border-radius: 12px;
  padding: 20px 28px;
  margin: 16px auto;
  text-align: center;
  max-width: 440px;
  width: 100%;
}
.conv__begin-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--p-navy, #1A3C5E);
  margin: 0 0 6px;
}
.conv__begin-sub {
  font-size: 0.82rem;
  color: #6B7A8D;
  margin: 0 0 14px;
  line-height: 1.5;
}
.conv__confirm-btn {
  background: #2A9D8F;
  border-color: #2A9D8F;
}
.conv__confirm-btn:hover {
  background: #228176;
}

.conv__waiting-confirm {
  font-size: 0.85rem;
  color: #6b7280;
  font-style: italic;
}

.conv__note {
  font-size: 0.85rem;
  color: #6b7280;
  padding: 4px 0;
}

/* ---- Confirm banner (practitioner side) ---- */
.conv__confirm-banner {
  background: #fff8e1;
  border: 1px solid #E9C46A;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.conv__confirm-banner p {
  flex: 1;
  font-size: 0.9rem;
  margin: 0;
}
.conv__confirm-banner .btn:disabled,
.conv__batch-actions .btn:disabled,
.conv__confirm-btn:disabled {
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}

/* ---- Review prompt ---- */
.conv__review-prompt {
  width: 100%;
  border-radius: 10px;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  overflow: hidden;
}
.conv__review-prompt-inner {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.conv__review-prompt p { margin: 0; font-size: 14px; color: #374151; }
.conv__review-stars {
  display: flex;
  gap: 4px;
}
.conv__star {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: transform 0.1s;
}
.conv__star:hover { transform: scale(1.2); }
.conv__review-textarea {
  width: 100%;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
}
.conv__review-textarea:focus { outline: none; border-color: #2A9D8F; }
.conv__review-actions { display: flex; gap: 8px; }
.conv__review-thanks {
  padding: 16px;
  text-align: center;
  color: #166534;
  font-weight: 600;
}

/* ---- Typing indicator ---- */
.conv__typing {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 4px 16px;
  font-size: 12px;
  color: #6b7280;
  font-style: italic;
}
.conv__typing.visible {
  display: flex;
}
.conv__typing-dots span {
  display: inline-block;
  animation: typingBounce 1.4s infinite;
  font-size: 1.2rem;
  line-height: 1;
  color: #9ca3af;
}
.conv__typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.conv__typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
}

/* ---- Badge variants (inquiry list) ---- */
.badge--info {
  background: #e3f2fd;
  color: #1565c0;
}
.badge--sm {
  font-size: 0.72rem;
  padding: 2px 8px;
}

/* ---- Mobile adjustments ---- */
@media (max-width: 768px) {
  .conv__thread {
    padding: 12px;
  }
  .conv__msg-bubble {
    max-width: 88%;
  }
  .conv__header {
    padding: 10px 12px;
  }
  .conv__confirm-banner {
    flex-direction: column;
    align-items: flex-start;
    margin: 0 12px;
  }
  .conv__input-area {
    padding: 10px 12px 14px;
  }
  .conv__card-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .modal-card {
    max-width: 92vw;
    padding: var(--space-5);
  }
  .modal-card--sm {
    max-width: 92vw;
  }
}
@media (max-width: 480px) {
  .conv__header-cards {
    flex-direction: column;
    gap: 6px;
  }
}
@media (max-height: 667px) {
  .conv__card-body { max-height: 180px; }
  .conv__card-body--inquiry { max-height: 180px; }
}

/* ========================================
   Parent Dashboard
   ======================================== */

/* ---- Empty State ---- */
.dash-empty {
  text-align: center;
  padding: 60px 20px;
}
.dash-empty__icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(42, 157, 143, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.dash-empty__title {
  font-family: var(--font-editorial);
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  margin: 0 0 8px;
}
.dash-empty__body {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  max-width: 400px;
  margin: 0 auto 24px;
}
.dash-empty__links {
  margin-top: 16px;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}
.dash-empty__links a {
  color: var(--color-secondary);
  text-decoration: none;
}
.dash-empty__links a:hover { text-decoration: underline; }
.dash-empty__links span { margin: 0 8px; }

/* ---- To-do's Section ---- */
.dash-todos {
  margin-bottom: 28px;
}
.dash-todos__header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.dash-todos__title {
  font-size: 16px;
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 13px;
}
.dash-todos__count {
  background: #DC2626;
  color: white;
  font-size: 11px;
  font-weight: var(--weight-bold);
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

/* ---- Action Items ---- */
.dash-actions {
  margin-bottom: 8px;
}
.dash-actions__count {
  background: #DC2626;
  color: white;
  font-size: 11px;
  font-weight: var(--weight-bold);
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}
.dash-action {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-bottom: 8px;
  cursor: pointer;
  transition: box-shadow var(--transition-fast), border-color var(--transition-fast);
  position: relative;
}
.dash-action:hover {
  box-shadow: var(--shadow-md);
  border-color: #D1D5DB;
}
.dash-action--urgent {
  border-left: 3px solid var(--color-secondary);
}
.dash-action__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-secondary);
}
.dash-action__icon i { width: 18px; height: 18px; }
.dash-action__text { flex: 1; min-width: 0; }
.dash-action__title {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--color-text);
  margin-bottom: 2px;
}
.dash-action__sub {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}
.dash-action__cta {
  font-size: 13px;
  font-weight: var(--weight-medium);
  color: var(--color-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}
.dash-action__dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #DC2626;
}
.dash-actions__more {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--color-secondary);
  text-decoration: none;
  padding: 8px;
}
.dash-actions__more:hover { text-decoration: underline; }

/* ---- Child Summary Cards ---- */
.dash-children {
  margin-bottom: 28px;
}
.dash-child-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
  padding: 16px 20px;
  background: var(--color-primary);
  color: white;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.dash-child-card:hover { background: #162d4a; }
.dash-child-card__left { flex: 1; min-width: 0; }
.dash-child-card__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}
.dash-child-card__chevron {
  /* Phase 6B / ISSUE-dashboard-001 — chevron container is now a 44×44
     touch target. The whole card is already tappable (delegated click
     in Portal.renderDashboard at L706), so this just upgrades the
     visual affordance to match the 44×44 rule. The glyph itself
     stays at font-size:24 inside the centred flex box. */
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin-left: 8px;
  font-size: 24px;
  color: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}
.dash-child__name {
  font-family: var(--font-editorial);
  font-size: 18px;
  font-weight: var(--weight-bold);
  color: white;
  margin: 0 0 2px;
}
.dash-child__meta {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
}
.dash-child__stats {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.dash-child__stat {
  display: flex;
  align-items: center;
  gap: 6px;
}
.dash-child__stat-label {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.5);
}
.dash-child__stat-value {
  font-size: 13px;
  font-weight: var(--weight-semibold);
  color: rgba(255, 255, 255, 0.9);
}
.dash-child__quiz-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(42, 157, 143, 0.2);
  border: 1px solid rgba(42, 157, 143, 0.45);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  color: #2A9D8F;
  text-decoration: none;
  white-space: nowrap;
}
.dash-child__quiz-pill:hover {
  background: rgba(42, 157, 143, 0.35);
}
.dash-child__dir-link {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.dash-child__dir-link:hover {
  color: rgba(255, 255, 255, 0.75);
}

/* ---- Add Child Button ---- */
.dash-add-child {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  /* Phase 6B / ISSUE-dashboard-004 — primary "Add a child" action sits
     56px tall instead of the previous ~52px so it feels inviting
     rather than borderline. Padding stays the same; min-height
     handles the floor. */
  min-height: 56px;
  padding: 16px;
  border: 2px dashed #D1D5DB;
  border-radius: 12px;
  background: transparent;
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}
.dash-add-child:hover {
  border-color: var(--color-secondary);
  color: var(--color-secondary);
}
.dash-add-child i { width: 18px; height: 18px; }

/* ---- Nudges ---- */
.dash-nudges {
  margin-bottom: 0;
}
.dash-nudge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(233, 196, 106, 0.10);
  border: 1px solid rgba(233, 196, 106, 0.25);
  border-radius: var(--radius-lg);
  margin-bottom: 8px;
  cursor: pointer;
  transition: background var(--transition-fast);
}
.dash-nudge:hover { background: rgba(233, 196, 106, 0.16); }
.dash-nudge__icon {
  flex-shrink: 0;
  color: #D97706;
}
.dash-nudge__icon i { width: 18px; height: 18px; }
.dash-nudge__text {
  flex: 1;
  font-size: 13px;
  color: var(--color-text);
  line-height: 1.4;
}
.dash-nudge__cta {
  font-size: 13px;
  font-weight: var(--weight-medium);
  color: #92400E;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---- Quick Links ---- */
.dash-quick-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}
.dash-quick-link {
  display: block;
  padding: 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.dash-quick-link:hover {
  border-color: var(--color-secondary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.dash-quick-link__icon {
  width: 20px;
  height: 20px;
  color: var(--color-secondary);
  margin-bottom: 8px;
}
.dash-quick-link__label {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
  margin-bottom: 2px;
}
.dash-quick-link__desc {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

/* ---- Dashboard Skeleton Loading ---- */
.dash-skeleton__bar {
  background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%);
  background-size: 200% 100%;
  animation: dash-shimmer 1.5s infinite;
  border-radius: 6px;
}
.dash-skeleton__card {
  height: 120px;
  background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%);
  background-size: 200% 100%;
  animation: dash-shimmer 1.5s infinite;
  border-radius: 12px;
  margin-bottom: 12px;
}
@keyframes dash-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- Dashboard Responsive ---- */
@media (max-width: 768px) {
  .dash-quick-links {
    grid-template-columns: 1fr;
  }
  .dash-child-card {
    flex-wrap: wrap;
  }
  .dash-child-card__right {
    flex-direction: row;
    gap: 10px;
  }
  .dash-child__stats {
    flex-direction: column;
    gap: 4px;
  }
  .dash-action {
    /* Phase 6B / ISSUE-dashboard-002 — at xs/sm, let the CTA wrap to
       its own row underneath the icon+text. Previously the CTA was
       hidden via display:none, so mobile parents had no visible
       call-to-action. align-items remains center which positions the
       icon vertically with the text on row 1; the CTA on row 2 spans
       full width by default. */
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
  }
  .dash-action__cta {
    /* Was display:none — re-shown for ISSUE-dashboard-002. Indent so
       the CTA aligns under the text column (icon 36 + gap 10 = 46),
       and enforce 44 px min height for a tap-friendly target. */
    display: inline-flex;
    align-items: center;
    margin-left: 46px;
    min-height: 44px;
  }
}

/* ======================================
   PROGRESS DASHBOARD (Parent)
   ====================================== */

/* Connection list */
.prog-conn-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.prog-conn-card:hover { border-color: #2A9D8F; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.prog-conn-card__child { font-weight: 600; color: var(--p-navy, #1A3C5E); font-size: 1rem; }
.prog-conn-card__meta { font-size: 0.82rem; color: #6B7A8D; margin-top: 2px; }
.prog-conn-card__prac { font-size: 0.85rem; color: #374151; text-align: right; }
.prog-conn-card__arrow { font-size: 1.4rem; color: #9CA3AF; margin-left: 12px; }

/* Back button */
.prog-back-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: none; border: none; color: #2A9D8F; font-size: 0.85rem; font-weight: 600;
  cursor: pointer; padding: 0; margin-bottom: 16px;
}
.prog-back-btn:hover { text-decoration: underline; }

/* Header card */
.prog-header {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
}
.prog-header__top { display: flex; justify-content: space-between; align-items: flex-start; }
.prog-header__child { font-size: 1.2rem; font-weight: 700; color: var(--p-navy, #1A3C5E); margin: 0; }
.prog-header__prac { font-size: 0.85rem; color: #6B7A8D; margin-top: 4px; }
.prog-status-badge { font-size: 0.75rem; padding: 4px 10px; border-radius: 99px; font-weight: 600; }
.prog-status-badge--paused { background: #FEF3C7; color: #92400E; }
.prog-status-badge--discharged { background: #F3F4F6; color: #6B7280; }

/* Section titles */
.prog-section-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--p-navy, #1A3C5E);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 14px;
}

/* Area overview / radar grid */
.prog-areas-overview { margin-bottom: 24px; }
.prog-radar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 16px;
}

/* Ring tiles */
.prog-area-tile {
  text-align: center;
  cursor: pointer;
  padding: 12px 8px;
  border-radius: 12px;
  transition: background 0.15s;
}
.prog-area-tile:hover { background: #F0FAF8; }
.prog-area-tile__ring { position: relative; width: 72px; height: 72px; margin: 0 auto 8px; }
.prog-ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.prog-ring-bg { fill: none; stroke: #E5E7EB; stroke-width: 2.5; }
.prog-ring-fill { fill: none; stroke-width: 2.5; stroke-linecap: round; transition: stroke-dasharray 0.6s ease; }
.prog-ring-text {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 0.85rem; font-weight: 700; color: var(--p-navy, #1A3C5E);
}
.prog-area-tile__name { font-size: 0.82rem; font-weight: 600; color: #374151; line-height: 1.3; }
.prog-area-tile__goals { font-size: 0.72rem; color: #9CA3AF; margin-top: 2px; }

/* Area detail cards */
.prog-area-details { margin-bottom: 24px; }
.prog-area-card {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
}
.prog-area-card__title { font-size: 0.95rem; font-weight: 700; color: var(--p-navy, #1A3C5E); margin: 0 0 12px; }
.prog-area-card__empty { font-size: 0.82rem; color: #9CA3AF; font-style: italic; }

/* Goal rows */
.prog-goal-row {
  padding: 8px 0;
  border-bottom: 1px solid #F3F4F6;
}
.prog-goal-row:last-child { border-bottom: none; }
.prog-goal-row__info { display: flex; align-items: center; gap: 8px; }
.prog-goal-row__name { flex: 1; font-size: 0.85rem; color: #374151; }
.prog-goal-row__value { font-size: 0.9rem; font-weight: 700; color: var(--p-navy, #1A3C5E); }
.prog-trend { font-size: 0.85rem; font-weight: 600; }
.prog-trend--up { color: #059669; }
.prog-trend--down { color: #DC2626; }
.prog-trend--same { color: #9CA3AF; }

/* Goal progress bar */
.prog-goal-bar {
  height: 6px;
  background: #E5E7EB;
  border-radius: 3px;
  margin-top: 6px;
  overflow: hidden;
}
.prog-goal-bar__fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* Sparkline */
.prog-sparkline { display: block; margin-top: 4px; }

/* Session timeline */
.prog-sessions { margin-bottom: 24px; }
.prog-sessions__empty { font-size: 0.85rem; color: #9CA3AF; font-style: italic; }
.prog-session-timeline-card {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
}
.prog-session-timeline-card__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.prog-session-timeline-card__date { font-size: 0.85rem; font-weight: 600; color: var(--p-navy, #1A3C5E); }
.prog-session-timeline-card__dur { font-size: 0.78rem; color: #6B7A8D; }
.prog-session-timeline-card__summary {
  font-size: 0.85rem;
  color: #374151;
  line-height: 1.6;
}
.prog-session-timeline-card__no-summary {
  font-size: 0.82rem;
  color: #9CA3AF;
  font-style: italic;
}

/* Summary formatted content */
.prog-summary-content p { margin: 0 0 8px; line-height: 1.6; }
.prog-summary-content p:last-child { margin-bottom: 0; }
.prog-summary-heading {
  display: block; font-size: 0.88rem; font-weight: 700; color: #1E3A5F;
  margin-top: 12px; margin-bottom: 4px;
}
.prog-summary-content p:first-child .prog-summary-heading:first-child { margin-top: 0; }

/* Progress dots (reuse from dashboard) */
.prog-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.prog-dot--green { background: #059669; }
.prog-dot--amber { background: #D97706; }
.prog-dot--red { background: #DC2626; }

/* Sign-off */
.prog-signoff {
  font-size: 0.82rem;
  color: #6B7A8D;
  font-style: italic;
  padding: 12px 16px;
  border-left: 3px solid;
  margin-top: 16px;
  background: #F9FAFB;
  border-radius: 0 8px 8px 0;
}

/* Mobile */
@media (max-width: 768px) {
  .prog-radar-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
  .prog-area-tile__ring { width: 60px; height: 60px; }
  .prog-header { padding: 14px 16px; }
  .prog-conn-card { padding: 12px 14px; }
  .prog-area-detail { padding: 14px; }
  .prog-goal-row { flex-wrap: wrap; gap: 4px; padding: 8px 0; }
  .prog-session-timeline-card { padding: 12px; }
}
@media (max-width: 480px) {
  .prog-radar-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }
  .prog-area-tile__ring { width: 50px; height: 50px; }
  .prog-area-tile__label { font-size: 0.7rem; }
  .prog-header__name { font-size: 1rem; }
  .prog-header__meta { font-size: 0.75rem; }
}

/* ========================================
   MODULE 3 — Home Program (Parent)
   ======================================== */

.hw-parent-section {
  margin: 24px 0;
}

.hw-parent-section__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 4px;
}

.hw-parent-section__subtitle {
  font-size: 13px;
  color: #6B7280;
  margin: 0 0 16px;
}

/* ---- Onboarding Banner ---- */
.hw-onboarding {
  background: rgba(233, 196, 106, 0.1);
  border: 1px solid rgba(233, 196, 106, 0.3);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #374151;
  line-height: 1.5;
}

.hw-onboarding__dismiss {
  background: none;
  border: none;
  color: #92750C;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  padding: 0;
}

/* ---- Parent Mini Calendar ---- */
.hw-parent-calendar {
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

.hw-parent-calendar__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #F8F9FA;
  border-bottom: 1px solid #E5E7EB;
}

.hw-parent-calendar__week-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
}

.hw-parent-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.hw-parent-calendar__day-label {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #9CA3AF;
  padding: 6px 0;
  background: #F8F9FA;
  border-bottom: 1px solid #E5E7EB;
}

.hw-parent-calendar__cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  border-right: 1px solid rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  min-height: 60px;
  cursor: default;
}

.hw-parent-calendar__cell:nth-child(7n) { border-right: none; }

.hw-parent-calendar__cell.is-today {
  background: rgba(42, 157, 143, 0.06);
  cursor: pointer;
}

.hw-parent-calendar__cell.is-future {
  opacity: 0.5;
}

.hw-parent-calendar__cell.is-past {
  opacity: 0.6;
}

.hw-parent-calendar__date {
  font-size: 12px;
  font-weight: 500;
  color: #6B7280;
  margin-bottom: 4px;
}

.hw-parent-calendar__cell.is-today .hw-parent-calendar__date {
  color: #2A9D8F;
  font-weight: 700;
}

.hw-parent-calendar__indicators {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
}

.hw-parent-calendar__check {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #D1D5DB;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.hw-parent-calendar__check--done {
  background: #16A34A;
  border-color: #16A34A;
  color: #fff;
}

.hw-parent-calendar__check--partial {
  background: #E9C46A;
  border-color: #E9C46A;
  color: #fff;
}

/* ---- Today's Activities ---- */
.hw-today-card {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: box-shadow 0.15s;
}

.hw-today-card:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06); }

.hw-today-card.is-completed {
  background: rgba(22, 163, 74, 0.04);
  border-color: rgba(22, 163, 74, 0.2);
}

.hw-today-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hw-today-card__title {
  font-size: 15px;
  font-weight: 600;
  color: #212529;
}

.hw-today-card.is-completed .hw-today-card__title {
  text-decoration: line-through;
  color: #6B7280;
}

.hw-today-card__checkbox {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #D1D5DB;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.hw-today-card__checkbox:hover {
  border-color: #16A34A;
}

.hw-today-card__checkbox.is-checked {
  background: #16A34A;
  border-color: #16A34A;
  color: #fff;
}

.hw-today-card__meta {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 4px;
  flex-wrap: wrap;
}

.hw-today-card__freq {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  background: rgba(233, 196, 106, 0.15);
  color: #92750C;
}

.hw-today-card__timer {
  font-size: 11px;
  color: #92750C;
}

.hw-today-card__goal {
  font-size: 12px;
  color: #6B7280;
  font-style: italic;
}

.hw-today-card__desc {
  font-size: 13px;
  color: #374151;
  line-height: 1.6;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #E5E7EB;
  display: none;
}

.hw-today-card.is-expanded .hw-today-card__desc {
  display: block;
}

.hw-today-card__note-form {
  margin-top: 8px;
  display: none;
}

.hw-today-card.is-expanded .hw-today-card__note-form {
  display: block;
}

.hw-today-card__note-input {
  width: 100%;
  font-size: 13px;
  padding: 6px 10px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  resize: none;
  min-height: 40px;
}

/* ---- Stats Bar (Parent) ---- */
.hw-parent-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.hw-parent-stat {
  flex: 1;
  background: #F8F9FA;
  border-radius: 10px;
  padding: 10px 12px;
  text-align: center;
}

.hw-parent-stat__value {
  font-size: 20px;
  font-weight: 700;
  color: #1E3A5F;
}

.hw-parent-stat__value--green { color: #16A34A; }

.hw-parent-stat__label {
  font-size: 11px;
  color: #6B7280;
  margin-top: 2px;
}

/* ---- Mobile (Parent) ---- */
@media (max-width: 640px) {
  .hw-parent-calendar__cell { min-height: 48px; padding: 6px 2px; }
  .hw-parent-calendar__date { font-size: 11px; }
  .hw-parent-calendar__check { width: 14px; height: 14px; font-size: 8px; }
}

@media (max-width: 480px) {
  .hw-parent-stats { flex-direction: column; gap: 8px; }
  .hw-today-card__header { flex-wrap: wrap; gap: 6px; }
}

/* ======================================
   CHILD PROFILE (Parent)
   ====================================== */

/* ---- Child Header ---- */
.child-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.child-header__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}
.child-header__info { flex: 1; min-width: 0; }
.child-header__name {
  font-family: var(--font-editorial);
  font-size: 22px;
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  margin: 0 0 2px;
}
.child-header__meta {
  font-size: 13px;
  color: var(--color-text-secondary);
}

/* ---- Section Title ---- */
.child-section__title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-secondary);
  margin: 0 0 10px;
}

/* ---- Attention ---- */
.child-attention { margin-bottom: 16px; }

/* ---- Service Tiles ---- */
.child-svc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.child-svc-tile {
  background: #fff;
  border: 0.5px solid #E5E7EB;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.1s;
}
.child-svc-tile:hover {
  border-color: var(--color-secondary);
  background: #F0FAF8;
  box-shadow: 0 2px 8px rgba(42,157,143,0.10);
  transform: translateY(-1px);
}
.child-svc-tile:active {
  transform: translateY(0);
  box-shadow: none;
  background: #E3F5F1;
}
.child-svc-tile--active {
  background: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}
.child-svc-tile--active:hover {
  background: #1a3352;
  border-color: var(--color-secondary);
  box-shadow: 0 2px 8px rgba(30,58,95,0.18);
}
.child-svc-tile--active:active {
  background: #162d47;
}
.child-svc-tile--active div { color: white !important; }
.child-svc-tile--suggest {
  background: #F8FAFC;
  border: 1px dashed var(--color-secondary);
}
.child-svc-tile--suggest:hover {
  background: #F0FAF8;
  border-style: solid;
}
.child-svc-tile--suggest div {
  color: var(--color-primary) !important;
}
.child-svc-tile--suggest div:last-child > div:last-child {
  color: var(--color-secondary) !important;
}
.child-svc-tile--suggest svg,
.child-svc-tile--suggest [data-lucide] {
  color: var(--color-secondary) !important;
  stroke: var(--color-secondary) !important;
}
.child-svc-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.child-svc-pill--primary {
  background: var(--color-primary);
  color: #fff;
}
.child-svc-pill--secondary {
  background: #E8F5F2;
  color: var(--color-secondary);
}
.child-svc-tile--active svg,
.child-svc-tile--active [data-lucide] { color: white !important; stroke: white !important; }
.child-svc-tile--expanded {
  box-shadow: 0 0 0 2px var(--color-secondary);
}
.child-svc-empty {
  border: 1px dashed #B8DED9;
  border-radius: 14px;
  padding: 1.75rem 1.5rem;
  text-align: center;
}

/* ---- Drill-down ---- */
.child-drill {
  background: #fff;
  border: 1px solid #B8DED9;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 10px;
}
.child-drill__banner {
  background: linear-gradient(135deg, #1E3A5F, #263F5F);
  padding: 1rem 1.25rem;
}
.child-drill__section {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #E8F5F3;
}
.child-drill__placeholder {
  text-align: center;
  padding: 1.5rem 1.25rem;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.child-drill__placeholder p {
  margin: 0;
  font-size: 13px;
  color: #9CA3AF;
  line-height: 1.5;
}
.child-drill__cal-hint {
  margin: 0 0 12px;
  font-size: 13px;
  color: #9CA3AF;
  line-height: 1.5;
}
.child-drill__radar-title {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
}
.child-drill__radar-sub {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--color-text-secondary);
}
.child-drill__notes {
  padding: 1rem 1.25rem;
  background: #FAFCFB;
}

/* ---- Reference Archive ---- */
.child-archive {
  background: #fff;
  border: 0.5px solid #E5E7EB;
  border-radius: 12px;
  overflow: hidden;
}
.child-archive__hdr {
  padding: 0.85rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.child-archive__body {
  display: none;
}
.child-archive.is-open .child-archive__body {
  display: block;
}
.child-archive.is-open .child-archive__hdr i[data-lucide="chevron-down"] {
  transform: rotate(180deg);
}
.child-archive__row {
  padding: 0.7rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background: #FAFAFA;
  border-top: 1px solid #F3F4F6;
  transition: background 0.15s, transform 0.1s;
}
.child-archive__row:hover {
  background: #E8F5F3;
  color: var(--color-secondary);
}
.child-archive__row:active {
  background: #D5EDE9;
  transform: scale(0.99);
}

/* ---- Child Calendar ---- */
.child-cal__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 14px;
}
.child-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.child-cal__hdr {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary);
  padding: 4px 0;
}
.child-cal__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 2px;
  border-radius: 8px;
  min-height: 36px;
}
.child-cal__day--has-event {
  background: #E8F5F3;
  border: 1px solid #B8DED9;
  cursor: pointer;
}
.child-cal__day--has-event:hover { background: #D1EDE8; }
.child-cal__day--today .child-cal__num { color: var(--color-secondary); font-weight: 700; }
.child-cal__day--empty { visibility: hidden; }
.child-cal__num { font-size: 13px; }
.child-cal__dots { display: flex; gap: 3px; margin-top: 2px; }
.child-cal__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
.child-cal__dot--teal { background: var(--color-secondary); }
.child-cal__dot--gold { background: var(--color-accent); }

/* ---- Goal Detail View ---- */
.child-goal-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
}
.child-goal__hdr {
  background: linear-gradient(135deg, #1E3A5F, #263F5F);
  border-radius: 16px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.25rem;
}
.child-goal__stats {
  display: flex;
  gap: 16px;
}
.child-goal__chart {
  background: #fff;
  border: 0.5px solid #E5E7EB;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.child-goal__why {
  background: #E8F5F3;
  border: 1px solid #B8DED9;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.child-goal__toward {
  background: #FFF8EC;
  border: 1px solid #F0D88A;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
}
.child-goal__log {
  background: #fff;
  border: 0.5px solid #E5E7EB;
  border-radius: 12px;
  overflow: hidden;
}
.child-goal__log-entry {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid #F3F4F6;
}

/* ---- Session Day View ---- */
.child-session__note {
  background: #fff;
  border: 0.5px solid #E5E7EB;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.child-session__note--pending {
  color: #9CA3AF;
  font-style: italic;
}
.child-session__goals {
  background: #fff;
  border: 0.5px solid #E5E7EB;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.child-session__goal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  background: #E8F5F3;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid #B8DED9;
  margin-bottom: 6px;
}
.child-session__goal-row:hover { background: #D1EDE8; }
.child-session__hw {
  background: #FFF8EC;
  border: 1px solid #F0D88A;
  border-radius: 12px;
  padding: 1rem 1.1rem;
}

/* ---- Practitioner Bar (white + navy pill) ---- */
.child-prac-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  background: #F7FAFA;
  border: 1px solid #E0EDEB;
  border-bottom: 1px solid #E0EDEB;
  margin-top: 16px;
  border-radius: 12px 12px 0 0;
}
.child-prac-bar__avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #1E3A5F;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #E9C46A;
  flex-shrink: 0;
}
.child-prac-bar__info {
  flex: 1;
  min-width: 0;
}
.child-prac-bar__name {
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.child-prac-bar__creds {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.child-prac-bar__pills {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.child-prac-bar__svc {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 10px;
  background: #1E3A5F;
  color: #E9C46A;
  font-weight: 600;
  white-space: nowrap;
}
.child-prac-bar__svc svg,
.child-prac-bar__svc [data-lucide] { color: #E9C46A !important; stroke: #E9C46A !important; }
.child-prac-bar__status {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  background: rgba(42, 157, 143, 0.08);
  color: #2A9D8F;
  font-weight: 600;
  white-space: nowrap;
}
.child-prac-bar__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

/* ---- Next Appointment Banner ---- */
.child-next-appt {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #E8F5F3;
  border: 1px solid #B8DED9;
  border-radius: 10px;
  padding: 0.7rem 1rem;
  margin-top: 12px;
}
.child-next-appt__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--color-secondary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
}
.child-next-appt__date {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-primary);
}
.child-next-appt__time {
  font-size: 12px;
  color: var(--color-text-secondary);
}

/* ---- Tabs ---- */
.child-tabs {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 1px solid var(--color-border);
  margin-top: 16px;
  gap: 4px;
}
.child-tabs::-webkit-scrollbar { display: none; }
.child-tabs__tab {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-secondary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s, border-color 0.15s;
  position: relative;
}
.child-tabs__tab:hover { color: var(--color-text); }
.child-tabs__tab--active {
  color: var(--color-secondary);
  font-weight: 600;
  border-bottom-color: var(--color-secondary);
}
.parent-tabs__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-error);
  color: white;
  font-size: 10px;
  font-weight: 500;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  margin-left: 5px;
  position: relative;
  top: -1px;
}

/* ---- Tab Panels ---- */
.child-tab-panel {
  display: none;
  min-height: 200px;
  padding-top: 20px;
}
.child-tab-panel--active {
  display: block;
}
/* Tab panels — only active panel is visible */
.parent-tab-panel {
  display: none;
}

.parent-tab-panel.is-active {
  display: block;
}

/* ---- Progress Tab (stacked layout) ---- */
.child-progress__heading {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
}
.child-progress__subheading {
  margin: 0 0 12px;
  font-size: 12px;
  color: #aaa;
}
.child-progress__radar-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 22px 24px 18px;
  margin-top: 16px;
}
.child-progress__radar-card svg {
  max-width: 400px;
  margin: 0 auto;
  display: block;
}
.child-progress__goals-section {
  margin-top: 24px;
}
.child-progress__goals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}
@media (max-width: 600px) {
  .child-progress__goals {
    grid-template-columns: 1fr;
  }
}

/* ---- Radar Legend ---- */
.child-radar__legend {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 10px;
}
.child-radar__legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #888;
}
.child-radar__legend-line {
  display: inline-block;
  width: 20px;
  height: 0;
  flex-shrink: 0;
}
.child-radar__legend-line--current {
  border-top: 2px solid #2A9D8F;
}
.child-radar__legend-line--baseline {
  border-top: 1.5px dashed #E9C46A;
  opacity: 0.6;
}

/* ---- Goal Cards (Progress Ring) ---- */
.child-goal-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s;
}
.child-goal-card:hover {
  border-color: #ccc;
}
.child-goal-card__ring {
  width: 48px;
  height: 48px;
  position: relative;
  flex-shrink: 0;
}
.child-goal-card__ring svg {
  width: 48px;
  height: 48px;
  transform: rotate(-90deg);
}
.child-goal-card__score {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
}
.child-goal-card__score--empty {
  color: #bbb;
}
.child-goal-card__info {
  flex: 1;
  min-width: 0;
}
.child-goal-card__title {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.35;
}
.child-goal-card__domain {
  font-size: 11px;
  color: #888;
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.child-goal-card__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.child-goal-card__trend {
  font-size: 11px;
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 14px;
  font-weight: 600;
}
.child-goal-card__trend--up {
  background: rgba(42, 157, 143, 0.08);
  color: #2A9D8F;
}
.child-goal-card__trend--down {
  background: rgba(231, 111, 81, 0.08);
  color: #E76F51;
}
.child-goal-card__trend--flat {
  background: #f5f5f3;
  color: #aaa;
}
.child-goal-card__trend--new {
  background: rgba(233, 196, 106, 0.12);
  color: #854F0B;
}

/* ---- Latest Session Teaser ---- */
.child-latest-session {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 18px 22px;
  margin-top: 16px;
}
.child-latest-session__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.child-latest-session__title {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
}
.child-latest-session__date {
  font-size: 11px;
  color: #aaa;
}
.child-latest-session__body {
  font-size: 12.5px;
  color: #333;
  line-height: 1.6;
}
.child-latest-session__tags {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.child-latest-session__tag {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
}
.child-latest-session__tag--summary {
  background: rgba(42, 157, 143, 0.08);
  color: #2A9D8F;
}
.child-latest-session__tag--hw {
  background: rgba(233, 196, 106, 0.12);
  color: #854F0B;
}

/* ---- Notes Toggle Bar ---- */
.child-notes-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  font-size: 12px;
  color: #888;
  cursor: pointer;
  margin-top: 16px;
}
.child-notes-bar:hover {
  border-color: #ccc;
}
.child-notes-bar__chevron {
  font-size: 14px;
  color: #aaa;
}
.child-notes-bar__content {
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #eee;
  border-top: none;
  border-radius: 0 0 8px 8px;
  margin-top: -1px;
}

/* ---- Sessions Tab ---- */
.child-sessions__row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  transition: background 0.1s;
}
.child-sessions__row:hover { background: var(--color-surface); }
.child-sessions__date {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-secondary);
  width: 50px;
  flex-shrink: 0;
}
.child-sessions__title {
  font-size: 13px;
  color: var(--color-text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.child-sessions__tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.child-sessions__tag--summary {
  background: #E8F5F3;
  color: var(--color-secondary);
}
.child-sessions__tag--hw {
  background: #FFF8EC;
  color: #B8860B;
}
.child-sessions__detail {
  padding: 12px 14px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}
.child-sessions__date--wide {
  width: 100px;
}

/* ---- Home Tasks Tab ---- */
.child-homework__section {
  margin-bottom: 20px;
}
.child-homework__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}
.child-homework__check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: white;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all 0.15s;
}
.child-homework__check:hover { border-color: var(--color-secondary); }
.child-homework__check--done {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  position: relative;
}
.child-homework__check--done::after {
  content: '\2713';
  color: white;
  font-size: 12px;
  font-weight: 700;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.child-homework__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}
.child-homework__desc {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 2px;
}
.child-homework__due {
  font-size: 12px;
  color: var(--color-text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}
.child-homework__due--overdue {
  color: #EF4444;
  font-weight: 600;
}

/* ---- Messages Tab ---- */
.child-messages {
  display: flex;
  flex-direction: column;
  height: 400px;
}
.child-messages__list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 150px;
  background: #f4f5f7;
  border-radius: 8px;
}
/* Message layout — matches practitioner conversation view */
.child-msg {
  display: flex;
  flex-direction: column;
  max-width: 78%;
  margin-bottom: 4px;
}
.child-msg--me {
  align-self: flex-end;
}
.child-msg--them {
  align-self: flex-start;
}
.child-msg--system {
  align-self: center;
  max-width: 90%;
}
.child-msg__row {
  display: flex;
  align-items: flex-end;
  gap: 5px;
}
.child-msg--me .child-msg__row {
  flex-direction: row-reverse;
}
.child-msg__bubble {
  padding: 9px 14px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}
.child-msg--me .child-msg__bubble {
  background: #1E3A5F;
  color: rgba(255,255,255,0.95);
  border-radius: 16px 4px 16px 16px;
}
.child-msg--them .child-msg__bubble {
  background: #fff;
  color: #1f2937;
  border-radius: 4px 16px 16px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.child-msg--system .child-msg__body {
  background: #fff;
  border: 1px dashed #e5e7eb;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: #6b7280;
  text-align: center;
}
.child-msg__time {
  font-size: 10px;
  color: #9ca3af;
  margin-top: 2px;
}
.child-msg--me .child-msg__time {
  text-align: right;
  padding-left: 19px;
}
.child-msg--system .child-msg__time {
  text-align: center;
}
.child-msg__sender {
  font-size: 11px;
  font-weight: 600;
  margin-top: 10px;
  margin-bottom: 2px;
}
.child-msg__sender--me {
  text-align: right;
  color: #1E3A5F;
}
.child-msg__sender--them {
  text-align: left;
  color: #228176;
}
/* Read tick */
.child-msg .conv__read-tick {
  flex-shrink: 0;
  margin-bottom: 2px;
}
.child-messages__input {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  padding: 10px 0 0;
  border-top: 1px solid var(--color-border);
}
.child-messages__input textarea {
  flex: 1;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
  resize: none;
  min-height: 36px;
}
.child-messages__attach-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.child-messages__attach-btn:hover {
  background: var(--color-surface);
  color: var(--color-primary);
}
.child-messages__send-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: var(--color-primary);
  color: #fff;
  cursor: pointer;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 0.15s;
}
.child-messages__send-btn:hover {
  background: var(--color-primary-dark, #1a7a6e);
}
.child-messages__hint {
  font-size: 11px;
  color: var(--color-text-secondary);
  padding: 4px 0 0 44px;
}
/* Attachment preview */
.child-messages__attach-preview {
  padding: 6px 0;
}
.child-messages__staged-file {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: var(--color-surface);
  border-radius: 6px;
  font-size: 12px;
  margin-bottom: 4px;
}
.child-messages__staged-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.child-messages__staged-size {
  color: var(--color-text-secondary);
  font-size: 11px;
  flex-shrink: 0;
}
.child-messages__staged-remove {
  border: none;
  background: none;
  color: var(--color-text-secondary);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
}
.child-messages__staged-remove:hover {
  color: #EF4444;
}
/* Attachment in message bubble */
.child-messages__attachment {
  margin-top: 6px;
  font-size: 12px;
}
.child-messages__attach-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--color-primary);
  text-decoration: none;
}
.child-msg--me .child-messages__attach-link {
  color: rgba(255,255,255,0.85);
}
.child-messages__attach-link:hover {
  text-decoration: underline;
}
.child-messages__uploading {
  color: var(--color-text-secondary);
  font-style: italic;
}

/* ---- Typing Indicator ---- */
.child-messages__typing {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  color: #999;
}
.child-messages__typing-dots {
  display: inline-flex;
  gap: 3px;
}
.child-messages__typing-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #aaa;
  animation: typingDot 1.2s infinite;
}
.child-messages__typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.child-messages__typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

/* ---- Calendar Tab Layout ---- */
.child-cal__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 12px;
}
.child-cal__detail {
  border-left: 1px solid var(--color-border);
  padding-left: 16px;
  min-height: 200px;
}
.child-cal__event {
  padding: 10px 12px;
  border-left: 3px solid var(--color-border);
  margin-bottom: 10px;
  border-radius: 0 8px 8px 0;
  background: var(--color-surface);
}
.child-cal__event--session { border-left-color: var(--color-secondary); }
.child-cal__event--hw { border-left-color: var(--color-accent); }
.child-cal__event-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
}
.child-cal__event-sub {
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-top: 2px;
}

/* ---- Child Profile Responsive ---- */
@media (max-width: 768px) {
  .child-svc-grid {
    grid-template-columns: 1fr;
  }
  .child-header__name { font-size: 18px; }
  .child-goal__stats { gap: 12px; }
  .child-cal__layout { grid-template-columns: 1fr; }
  .child-cal__detail { border-left: none; border-top: 1px solid var(--color-border); padding: 16px 0 0; }
}

/* ---- Documents Tab ---- */
.child-docs {
  padding: 8px 0;
}
.child-docs__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.child-docs__table thead th {
  text-align: left;
  font-weight: 600;
  color: var(--color-text-secondary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 12px;
  border-bottom: 2px solid var(--color-border);
}
.child-docs__table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.child-docs__table tbody tr:last-child td {
  border-bottom: none;
}
.child-docs__table tbody tr:hover {
  background: var(--color-surface);
}
.child-docs__link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}
.child-docs__link:hover {
  text-decoration: underline;
}
.child-docs__type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.child-docs__type-badge--pdf {
  background: #FEE2E2;
  color: #DC2626;
}
.child-docs__type-badge--word {
  background: #DBEAFE;
  color: #2563EB;
}
.child-docs__type-badge--jpeg,
.child-docs__type-badge--png,
.child-docs__type-badge--webp,
.child-docs__type-badge--image {
  background: #D1FAE5;
  color: #059669;
}
.child-docs__type-badge--file {
  background: #F3F4F6;
  color: #6B7280;
}

@media (max-width: 600px) {
  .child-docs__table thead th:nth-child(2),
  .child-docs__table tbody td:nth-child(2) {
    display: none;
  }
}

@media (max-width: 480px) {
  .child-header { gap: 10px; }
  .child-header__avatar { width: 44px; height: 44px; font-size: 15px; }
  .child-goal__hdr { padding: 1rem; }
  .child-tabs__tab { padding: 8px 10px; font-size: 12px; }
}

/* ---- Dashboard Overlay ---- */
.dash-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1000;
  display: flex; justify-content: center; align-items: center;
  padding: 20px;
}
.dash-overlay__backdrop {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4); cursor: pointer;
}
.dash-overlay__panel {
  position: relative; width: 480px; max-width: calc(100vw - 32px);
  max-height: calc(100vh - 40px);
  background: #fff; display: flex; flex-direction: column;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  animation: dashOverlayFadeScale 0.2s ease-out;
}
@keyframes dashOverlayFadeScale { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.dash-overlay__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid #eee; flex-shrink: 0;
}
.dash-overlay__title { margin: 0; font-size: 20px; font-weight: 700; color: #1E3A5F; font-family: 'Playfair Display', serif; }
.dash-overlay__close {
  width: 32px; height: 32px; border: none; background: none; font-size: 22px;
  color: #9CA3AF; cursor: pointer; border-radius: 6px; display: flex; align-items: center; justify-content: center;
}
.dash-overlay__close:hover { background: #f3f4f6; color: #374151; }
.dash-overlay__body { flex: 1; overflow-y: auto; padding: 24px; }

/* Wide centered modal variant (session wizard) */
.dash-overlay--wide {
  justify-content: center; align-items: center; padding: 24px;
}
.dash-overlay--wide .dash-overlay__panel {
  width: 900px; max-width: 100%; height: auto; max-height: calc(100vh - 48px);
  border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: dashOverlayFadeIn 0.2s ease-out;
}
@keyframes dashOverlayFadeIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.dash-overlay--wide .dash-overlay__header { display: none; }
.dash-overlay--wide .dash-overlay__body { padding: 0; }

@media (max-width: 960px) {
  .dash-overlay--wide { padding: 12px; }
  .dash-overlay--wide .dash-overlay__panel { max-height: calc(100vh - 24px); border-radius: 12px; }
}
@media (max-width: 640px) {
  .dash-overlay--wide { padding: 0; }
  .dash-overlay--wide .dash-overlay__panel { width: 100%; max-height: 100vh; border-radius: 0; }
}

/* Goal detail overlay */
.goal-detail { }
.goal-detail__top { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 20px; }
.goal-detail__ring { flex-shrink: 0; width: 80px; height: 80px; }
.goal-detail__ring svg { width: 100%; height: 100%; }
.goal-detail__meta { flex: 1; }
.goal-detail__title { font-size: 16px; font-weight: 600; color: #1E3A5F; margin-bottom: 4px; }
.goal-detail__area { font-size: 12px; color: #6B7A8D; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.goal-detail__area-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.goal-detail__stats { display: flex; gap: 16px; flex-wrap: wrap; }
.goal-detail__stat { text-align: center; }
.goal-detail__stat-val { font-size: 18px; font-weight: 700; color: #1E3A5F; }
.goal-detail__stat-val--up { color: #16A34A; }
.goal-detail__stat-lbl { font-size: 10px; color: #9CA3AF; text-transform: uppercase; letter-spacing: 0.5px; }

.goal-detail__section { margin-top: 20px; }
.goal-detail__section-title {
  font-size: 11px; font-weight: 600; color: #6B7A8D; text-transform: uppercase;
  letter-spacing: 0.5px; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid #f0f0f0;
}

.goal-detail__history-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,0.04); font-size: 13px;
}
.goal-detail__history-date { color: #6B7A8D; min-width: 80px; }
.goal-detail__history-val { font-weight: 600; color: #1E3A5F; }
.goal-detail__history-note { color: #9CA3AF; font-size: 12px; flex: 1; margin: 0 12px; }

.goal-detail__edit-form { background: #f9fafb; border-radius: 8px; padding: 16px; margin-top: 12px; }
.goal-detail__edit-row { display: flex; gap: 8px; margin-bottom: 8px; }
.goal-detail__edit-row label { font-size: 12px; font-weight: 500; color: #374151; min-width: 80px; padding-top: 8px; }
.goal-detail__edit-row input,
.goal-detail__edit-row select { flex: 1; }

/* Add measurement inline form */
.goal-detail__add-entry { background: #f0fdf4; border-radius: 8px; padding: 16px; margin-top: 12px; }
.goal-detail__add-entry h4 { font-size: 13px; font-weight: 600; color: #16A34A; margin: 0 0 8px; }

@media (max-width: 640px) {
  .dash-overlay { padding: 16px; }
  .dash-overlay__panel { max-width: 100%; }
  .dash-overlay__body { padding: 16px; }
}

/* ---- Goals Tab ---- */
.goals-area { border: 1px solid #eee; border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.goals-area--archived { opacity: 0.6; }
.goals-area__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; cursor: pointer; background: #fafbfc;
  transition: background 0.15s;
}
.goals-area__header:hover { background: #f0f2f5; }
.goals-area__left { display: flex; align-items: center; gap: 10px; }
.goals-area__dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.goals-area__name { font-size: 14px; font-weight: 600; color: #1E3A5F; }
.goals-area__meta { font-size: 11px; color: #9CA3AF; margin-top: 1px; }
.goals-area__right { display: flex; align-items: center; gap: 10px; }
.goals-area__avg { font-size: 14px; font-weight: 700; color: #2A9D8F; }
.goals-area__chevron { transition: transform 0.2s; display: flex; }
.goals-area__chevron--collapsed { transform: rotate(-90deg); }
.goals-area__body { padding: 0 16px 14px; }

.goals-area__rationale {
  background: #f9fafb; border-radius: 8px; padding: 12px; margin-bottom: 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.goals-area__rationale-item { font-size: 13px; color: #374151; display: flex; gap: 8px; }
.goals-area__rationale-label {
  font-size: 10px; font-weight: 600; color: #6B7A8D; text-transform: uppercase;
  letter-spacing: 0.5px; min-width: 80px; padding-top: 2px; flex-shrink: 0;
}

.goals-area__empty {
  text-align: center; padding: 20px; color: #9CA3AF; font-size: 13px;
}

.goals-area__actions {
  display: flex; gap: 8px; margin-top: 8px; padding-top: 8px;
  border-top: 1px solid #f0f0f0;
}

/* Goal rows within area */
.goals-tab__list { display: flex; flex-direction: column; gap: 2px; }
.goals-tab__goal {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 8px; cursor: pointer;
  transition: background 0.15s;
}
.goals-tab__goal:hover { background: #f5f7fa; }
.goals-tab__goal--achieved { opacity: 0.6; }

.goals-tab__ring { position: relative; width: 36px; height: 36px; flex-shrink: 0; }
.goals-tab__ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.goals-tab__ring-val {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-size: 9px; font-weight: 700; color: #1E3A5F;
}

.goals-tab__info { flex: 1; min-width: 0; }
.goals-tab__title { font-size: 13px; font-weight: 500; color: #1E3A5F; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goals-tab__subtitle { font-size: 11px; color: #9CA3AF; display: flex; gap: 8px; margin-top: 1px; }
.goals-tab__type {
  background: #eef2f7; color: #6B7A8D; font-size: 9px; font-weight: 700;
  padding: 1px 4px; border-radius: 3px;
}

.goals-tab__spark-col { width: 80px; flex-shrink: 0; }
.goals-tab__spark { width: 100%; height: 24px; display: block; }

.goals-tab__end { text-align: right; min-width: 60px; flex-shrink: 0; }
.goals-tab__current { font-size: 14px; font-weight: 700; color: #1E3A5F; }
.goals-tab__trend { font-size: 10px; font-weight: 600; }
.goals-tab__trend--up { color: #16A34A; }
.goals-tab__trend--down { color: #EF4444; }
.goals-tab__trend--flat { color: #9CA3AF; }
.goals-tab__trend--new { color: #9CA3AF; }
.goals-tab__trend--achieved { color: #16A34A; }

@media (max-width: 640px) {
  .goals-tab__spark-col { display: none; }
  .goals-tab__goal { gap: 8px; padding: 8px; }
  .goals-area__rationale-item { flex-direction: column; gap: 2px; }
  .goals-area__rationale-label { min-width: auto; }
}

/* ========================================
   PARENT PORTAL — Visual Reference
   ======================================== */

/* ============================================
   PARENT HEADER — Practitioner bar
   Replaces .child-prac-bar
   ============================================ */
.parent-header {
  background: #1E3A5F;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.parent-header__logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #E9C46A;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 14px;
  color: #1E3A5F;
  flex-shrink: 0;
}

.parent-header__info {
  flex: 1;
  min-width: 0;
}

.parent-header__name {
  font-size: 15px;
  font-weight: 500;
  color: #FFFFFF;
  margin: 0;
  line-height: 1.3;
}

.parent-header__meta {
  font-size: 12px;
  color: #9FE1CB;
  margin: 2px 0 0;
  line-height: 1.3;
}

/* ============================================
   PARENT TAB BAR
   Replaces .child-tabs
   ============================================ */
.parent-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: #F3F4F6;
  border-radius: 12px;
  padding: 4px;
  scrollbar-width: none;
}

.parent-tabs::-webkit-scrollbar {
  display: none;
}

.parent-tabs__tab {
  flex: none;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  background: transparent;
  color: #6B7280;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}

.parent-tabs__tab.is-active {
  background: #FFFFFF;
  color: #1E3A5F;
}

/* ============================================
   PARENT OVERVIEW TAB
   ============================================ */

/* Latest session banner */
.parent-overview__banner {
  background: #E1F5EE;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.parent-overview__banner-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.parent-overview__banner-icon svg {
  flex-shrink: 0;
}

.parent-overview__banner-title {
  font-size: 14px;
  font-weight: 500;
  color: #0F6E56;
  margin: 0;
  line-height: 1.3;
}

.parent-overview__banner-body {
  font-size: 13px;
  color: #0F6E56;
  margin: 0 0 12px;
  line-height: 1.55;
}

.parent-overview__banner-btn {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #0F6E56;
  background: transparent;
  font-size: 13px;
  color: #0F6E56;
  font-weight: 500;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  line-height: 1;
}

.parent-overview__banner-btn:hover {
  background: rgba(15, 110, 86, 0.08);
}

/* Section heading */
.parent-overview__section-title {
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 12px;
  color: #111827;
}

/* Goal progress card */
.parent-goal-card {
  background: #FFFFFF;
  border: 0.5px solid #E5E7EB;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 10px;
}

.parent-goal-card__domain {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.parent-goal-card__domain-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.parent-goal-card__domain-name {
  font-size: 11px;
  font-weight: 500;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin: 0;
  line-height: 1;
}

.parent-goal-card__title {
  font-size: 15px;
  font-weight: 500;
  margin: 6px 0 10px;
  color: #111827;
  line-height: 1.35;
}

.parent-goal-card__stats {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.parent-goal-card__context {
  font-size: 12px;
  color: #6B7280;
  margin: 0;
  line-height: 1.3;
}

.parent-goal-card__value {
  font-size: 18px;
  font-weight: 500;
  color: #111827;
  margin: 0;
  line-height: 1;
  flex-shrink: 0;
  margin-left: 12px;
}

.parent-goal-card__value--at-target {
  color: #2A9D8F;
}

.parent-goal-card__value--up {
  color: #2A9D8F;
}

/* Progress bar */
.parent-goal-card__bar-container {
  margin-bottom: 6px;
}

.parent-goal-card__bar {
  height: 8px;
  background: #E5E7EB;
  border-radius: 4px;
  overflow: hidden;
}

.parent-goal-card__bar-fill {
  height: 100%;
  border-radius: 4px;
  background: #2A9D8F;
  transition: width 0.3s ease;
}

/* Target line below bar */
.parent-goal-card__target {
  font-size: 12px;
  color: #6B7280;
  margin: 0;
  line-height: 1.3;
}

.parent-goal-card__target--reached {
  color: #0F6E56;
  font-weight: 500;
}

/* Context callout — shows when goal has recently changed level */
.parent-goal-card__callout {
  background: #E1F5EE;
  border-radius: 8px;
  padding: 8px 12px;
  margin-top: 10px;
  font-size: 12px;
  color: #0F6E56;
  line-height: 1.45;
}

/* Today's home practice summary */
.parent-overview__practice {
  background: #F3F4F6;
  border-radius: 12px;
  padding: 14px;
  margin-top: 8px;
}

.parent-overview__practice-title {
  font-size: 13px;
  font-weight: 500;
  margin: 0 0 6px;
  color: #111827;
}

.parent-overview__practice-item {
  font-size: 13px;
  color: #6B7280;
  margin: 0;
  line-height: 1.5;
}

/* Empty state — when no sessions exist yet */
.parent-overview__empty {
  text-align: center;
  padding: 40px 20px;
  color: #6B7280;
}

.parent-overview__empty-title {
  font-size: 16px;
  font-weight: 500;
  color: #111827;
  margin: 0 0 8px;
}

.parent-overview__empty-text {
  font-size: 13px;
  color: #6B7280;
  margin: 0;
  line-height: 1.5;
}

/* ============================================
   PARENT LATEST SESSION TAB
   ============================================ */
.parent-latest__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.parent-latest__header-left {
  flex: 1;
}

.parent-latest__prac-name {
  font-size: 12px;
  color: #6B7280;
  margin: 0 0 3px;
  line-height: 1.3;
}

.parent-latest__date {
  font-size: 20px;
  font-weight: 500;
  color: #111827;
  margin: 0;
  line-height: 1.25;
}

.parent-latest__duration {
  font-size: 13px;
  color: #6B7280;
  margin: 0;
  line-height: 1.3;
  flex-shrink: 0;
}

/* Summary text */
.parent-latest__summary {
  font-size: 14px;
  line-height: 1.75;
  color: #111827;
  margin-bottom: 20px;
}

.parent-latest__summary p {
  margin: 0 0 12px;
}

.parent-latest__summary p:last-child {
  margin-bottom: 0;
}

/* Progress section */
.parent-latest__progress {
  background: #F3F4F6;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.parent-latest__progress-title {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  margin: 0 0 12px;
}

.parent-latest__progress-row {
  margin-bottom: 10px;
}

.parent-latest__progress-row:last-child {
  margin-bottom: 0;
}

.parent-latest__progress-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.parent-latest__progress-name {
  font-size: 13px;
  color: #111827;
  margin: 0;
}

.parent-latest__progress-value {
  font-size: 13px;
  font-weight: 500;
  color: #2A9D8F;
  margin: 0;
  white-space: nowrap;
}

.parent-latest__progress-bar {
  height: 6px;
  background: #E5E7EB;
  border-radius: 3px;
  overflow: hidden;
}

.parent-latest__progress-fill {
  height: 100%;
  background: #2A9D8F;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Home practice section */
.parent-latest__practice {
  background: #FFFFFF;
  border: 0.5px solid #E5E7EB;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.parent-latest__practice-title {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  margin: 0 0 12px;
}

.parent-latest__practice-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.parent-latest__practice-item:last-child {
  margin-bottom: 0;
}

.parent-latest__practice-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.parent-latest__practice-info {
  flex: 1;
}

.parent-latest__practice-name {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
  margin: 0 0 3px;
}

.parent-latest__practice-freq {
  font-size: 12px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 6px;
  display: inline-block;
  margin-left: 8px;
}

.parent-latest__practice-freq--daily {
  background: #E1F5EE;
  color: #0F6E56;
}

.parent-latest__practice-freq--3x {
  background: #FEF3C7;
  color: #854F0B;
}

.parent-latest__practice-freq--weekly {
  background: #E0F2FE;
  color: #0C4A6E;
}

.parent-latest__practice-cue {
  font-size: 12px;
  color: #6B7280;
  margin: 3px 0 0;
  line-height: 1.45;
}

/* Previous sessions link */
.parent-latest__prev-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #6B7280;
  cursor: pointer;
  padding: 8px 0;
}

.parent-latest__prev-link:hover {
  color: #2A9D8F;
}

/* Empty state */
.parent-latest__empty {
  text-align: center;
  padding: 40px 20px;
}

.parent-latest__empty-title {
  font-size: 16px;
  font-weight: 500;
  color: #111827;
  margin: 0 0 8px;
}

.parent-latest__empty-text {
  font-size: 13px;
  color: #6B7280;
  margin: 0;
  line-height: 1.5;
}

/* ============================================
   PARENT HOME PRACTICE TAB
   ============================================ */

/* Page title */
.parent-home__page-title {
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 4px;
  color: #111827;
}

.parent-home__page-subtitle {
  font-size: 13px;
  color: #6B7280;
  margin: 0 0 16px;
}

/* Weekly tracker */
.parent-home__tracker {
  background: #F3F4F6;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.parent-home__tracker-title {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 10px;
  color: #111827;
}

.parent-home__tracker-cards {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.parent-home__tracker-card {
  flex: 1;
  background: #FFFFFF;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
}

.parent-home__tracker-label-text {
  font-size: 11px;
  color: #6B7280;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 4px;
}

.parent-home__tracker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.parent-home__tracker-count {
  font-size: 22px;
  font-weight: 500;
  color: #2A9D8F;
  margin: 0;
  line-height: 1.2;
}

.parent-home__tracker-count span {
  font-size: 13px;
  color: #6B7280;
  font-weight: 400;
}

.parent-home__tracker-sublabel {
  font-size: 10px;
  color: #6B7280;
  margin: 3px 0 0;
}

/* Calendar row */
.parent-home__calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
  margin-bottom: 8px;
}

.parent-home__calendar-header {
  font-size: 11px;
  color: #6B7280;
  padding: 4px 0;
}

.parent-home__calendar-day {
  padding: 6px 0;
  font-size: 12px;
  border-radius: 8px;
  line-height: 1.3;
}

.parent-home__calendar-day--done {
  background: #E1F5EE;
  color: #0F6E56;
  font-weight: 500;
}

.parent-home__calendar-day--empty {
  border: 0.5px solid #E5E7EB;
  color: #6B7280;
}

.parent-home__calendar-day--today {
  background: #E1F5EE;
  color: #0F6E56;
  font-weight: 500;
}

.parent-home__calendar-check {
  display: block;
  margin: 2px auto 0;
}

/* Section label */
.parent-home__section-label {
  font-size: 14px;
  font-weight: 500;
  margin: 0 0 10px;
  color: #111827;
}

/* Activity card */
.parent-home__activity {
  background: #FFFFFF;
  border: 0.5px solid #E5E7EB;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 10px;
}

.parent-home__activity-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.parent-home__activity-name {
  display: flex;
  align-items: center;
  gap: 8px;
}

.parent-home__activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.parent-home__activity-title {
  font-size: 15px;
  font-weight: 500;
  margin: 0;
  color: #111827;
}

.parent-home__activity-freq {
  font-size: 12px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.parent-home__activity-freq--daily {
  background: #E1F5EE;
  color: #0F6E56;
}

.parent-home__activity-freq--3x {
  background: #FEF3C7;
  color: #854F0B;
}

.parent-home__activity-freq--weekly {
  background: #E0F2FE;
  color: #0C4A6E;
}

.parent-home__activity-desc {
  font-size: 13px;
  margin: 0 0 4px;
  line-height: 1.5;
  color: #111827;
}

.parent-home__activity-cue {
  font-size: 13px;
  color: #6B7280;
  margin: 0 0 12px;
  line-height: 1.5;
}

/* Done / Skip buttons */
.parent-home__activity-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.parent-home__btn-done {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  background: #2A9D8F;
  color: white;
  border: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
}

.parent-home__btn-done.is-done {
  background: #E1F5EE;
  color: #0F6E56;
  border: 0.5px solid #2A9D8F;
}

.parent-home__btn-skip {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  border: 0.5px solid #E5E7EB;
  background: transparent;
  font-size: 13px;
  cursor: pointer;
  color: #6B7280;
  font-family: 'DM Sans', sans-serif;
}

/* Note section */
.parent-home__note-section {
  border-top: 0.5px solid #E5E7EB;
  padding-top: 12px;
}

.parent-home__note-label {
  font-size: 12px;
  font-weight: 500;
  color: #6B7280;
  margin: 0 0 6px;
}

.parent-home__note-label span {
  font-weight: 400;
}

.parent-home__note-input {
  width: 100%;
  padding: 10px 14px;
  border: 0.5px solid #E5E7EB;
  border-radius: 8px;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
  min-height: 44px;
  resize: vertical;
  color: #111827;
  background: #FFFFFF;
}

.parent-home__note-input::placeholder {
  color: #9CA3AF;
}

.parent-home__note-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

.parent-home__note-hint {
  font-size: 11px;
  color: #6B7280;
  margin: 0;
}

.parent-home__note-saved {
  font-size: 11px;
  color: #2A9D8F;
  font-weight: 500;
}

/* Ongoing reminder */
.parent-home__reminder {
  background: rgba(233, 196, 106, 0.12);
  border-left: 3px solid #E9C46A;
  padding: 12px 16px;
  margin-top: 6px;
}

.parent-home__reminder-title {
  font-size: 13px;
  font-weight: 500;
  color: #854F0B;
  margin: 0 0 4px;
}

.parent-home__reminder-text {
  font-size: 13px;
  color: #854F0B;
  margin: 0;
  line-height: 1.5;
}

/* Helper text for frequency activities */
.parent-home__freq-hint {
  font-size: 11px;
  color: #6B7280;
  margin: 8px 0 0;
}

/* ============================================
   PARENT THE PLAN TAB
   ============================================ */

.parent-plan__page-title {
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 4px;
  color: #111827;
}

.parent-plan__page-subtitle {
  font-size: 13px;
  color: #6B7280;
  margin: 0 0 16px;
}

.parent-plan__area {
  background: #FFFFFF;
  border: 0.5px solid #E5E7EB;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 12px;
}

.parent-plan__area-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.parent-plan__area-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.parent-plan__area-name {
  font-size: 17px;
  font-weight: 500;
  margin: 0;
  color: #111827;
}

.parent-plan__section-label {
  font-size: 12px;
  font-weight: 500;
  margin: 0 0 6px;
  letter-spacing: 0.2px;
}

.parent-plan__section-text {
  font-size: 14px;
  margin: 0 0 16px;
  line-height: 1.65;
  color: #374151;
}

.parent-plan__goals {
  border-top: 0.5px solid #E5E7EB;
  padding-top: 14px;
}

.parent-plan__goal {
  background: #F3F4F6;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
}

.parent-plan__goal:last-child {
  margin-bottom: 0;
}

.parent-plan__goal-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}

.parent-plan__goal-name {
  font-size: 14px;
  font-weight: 500;
  margin: 0;
  color: #111827;
}

.parent-plan__goal-value {
  font-size: 14px;
  font-weight: 500;
  margin: 0;
  color: #111827;
  flex-shrink: 0;
  margin-left: 12px;
}

.parent-plan__goal-value--at-target {
  color: #2A9D8F;
}

.parent-plan__goal-bar {
  height: 5px;
  background: #E5E7EB;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}

.parent-plan__goal-bar-fill {
  height: 100%;
  border-radius: 3px;
}

.parent-plan__goal-meta {
  font-size: 12px;
  color: #6B7280;
  margin: 0;
}

/* Empty state */
.parent-plan__empty {
  text-align: center;
  padding: 40px 20px;
}

.parent-plan__empty-title {
  font-size: 16px;
  font-weight: 500;
  color: #111827;
  margin: 0 0 8px;
}

.parent-plan__empty-text {
  font-size: 13px;
  color: #6B7280;
  margin: 0;
  line-height: 1.5;
}

/* ============================================
   PARENT REFERENCES TAB
   ============================================ */

.parent-ref__page-title {
  font-size: 20px;
  font-weight: 500;
  margin: 0 0 4px;
  color: #111827;
}

.parent-ref__page-subtitle {
  font-size: 13px;
  color: #6B7280;
  margin: 0 0 14px;
}

/* Sub-toggle: Sessions / Documents */
.parent-ref__toggle {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  background: #F3F4F6;
  border-radius: 8px;
  padding: 3px;
}

.parent-ref__toggle-btn {
  flex: 1;
  padding: 7px;
  font-size: 12px;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  color: #6B7280;
  font-family: 'DM Sans', sans-serif;
}

.parent-ref__toggle-btn.is-active {
  background: #FFFFFF;
  color: #1E3A5F;
}

/* Breadcrumb */
.parent-ref__breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 13px;
  flex-wrap: wrap;
}

.parent-ref__breadcrumb-link {
  color: #6B7280;
  cursor: pointer;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  font-family: 'DM Sans', sans-serif;
}

.parent-ref__breadcrumb-link:hover {
  text-decoration: underline;
}

.parent-ref__breadcrumb-sep {
  color: #9CA3AF;
}

.parent-ref__breadcrumb-current {
  font-weight: 500;
  color: #111827;
}

/* Year / Month drill-down card */
.parent-ref__card {
  background: #FFFFFF;
  border: 0.5px solid #E5E7EB;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color 0.15s;
}

.parent-ref__card:hover {
  border-color: #D1D5DB;
}

.parent-ref__card-title {
  font-size: 15px;
  font-weight: 500;
  margin: 0;
  color: #111827;
}

.parent-ref__card-meta {
  font-size: 12px;
  color: #6B7280;
  margin: 3px 0 0;
}

/* Session card (date-level list) */
.parent-ref__session-card {
  background: #FFFFFF;
  border: 0.5px solid #E5E7EB;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.parent-ref__session-card:hover {
  border-color: #D1D5DB;
}

.parent-ref__session-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.parent-ref__session-date {
  font-size: 15px;
  font-weight: 500;
  margin: 0;
  color: #111827;
}

.parent-ref__session-summary {
  font-size: 12px;
  color: #6B7280;
  margin: 4px 0 8px;
  line-height: 1.5;
}

/* Goal chips on session cards */
.parent-ref__goal-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.parent-ref__goal-chip {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #F3F4F6;
  color: #374151;
}

.parent-ref__goal-chip b {
  font-weight: 500;
}

.parent-ref__goal-chip-delta {
  color: #2A9D8F;
}

.parent-ref__goal-chip-note {
  color: #6B7280;
}

/* Full session view (deepest drill-down) */
.parent-ref__full-session-title {
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 4px;
  color: #111827;
}

.parent-ref__full-session-meta {
  font-size: 12px;
  color: #6B7280;
  margin: 0 0 16px;
}

.parent-ref__full-session-summary {
  font-size: 14px;
  line-height: 1.75;
  color: #111827;
  margin-bottom: 16px;
}

.parent-ref__full-session-summary p {
  margin: 0 0 12px;
}

.parent-ref__full-session-summary p:last-child {
  margin-bottom: 0;
}

.parent-ref__full-session-progress {
  background: #F3F4F6;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.parent-ref__full-session-progress-title {
  font-size: 13px;
  font-weight: 500;
  margin: 0 0 8px;
  color: #111827;
}

.parent-ref__full-session-progress-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 12px;
}

.parent-ref__full-session-hw {
  background: #FFFFFF;
  border: 0.5px solid #E5E7EB;
  border-radius: 8px;
  padding: 12px;
}

.parent-ref__full-session-hw-title {
  font-size: 13px;
  font-weight: 500;
  margin: 0 0 4px;
  color: #111827;
}

.parent-ref__full-session-hw-text {
  font-size: 12px;
  color: #6B7280;
  margin: 0;
  line-height: 1.5;
}

/* Document items */
.parent-ref__doc {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #FFFFFF;
  border: 0.5px solid #E5E7EB;
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.parent-ref__doc:hover {
  border-color: #D1D5DB;
}

.parent-ref__doc-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: #FEE2E2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 500;
  color: #991B1B;
  flex-shrink: 0;
}

.parent-ref__doc-info {
  flex: 1;
  min-width: 0;
}

.parent-ref__doc-name {
  font-size: 13px;
  font-weight: 500;
  margin: 0;
  color: #111827;
}

.parent-ref__doc-meta {
  font-size: 12px;
  color: #6B7280;
  margin: 2px 0 0;
}

/* Empty state */
.parent-ref__empty {
  text-align: center;
  padding: 40px 20px;
  color: #6B7280;
}

.parent-ref__empty-title {
  font-size: 16px;
  font-weight: 500;
  color: #111827;
  margin: 0 0 8px;
}

.parent-ref__empty-text {
  font-size: 13px;
  color: #6B7280;
  margin: 0;
  line-height: 1.5;
}

/* Chevron icon */
.parent-ref__chevron {
  flex-shrink: 0;
}

/* ============================================
   PARENT SERVICE SELECTION PAGE
   ============================================ */

/* Back link */
.parent-back {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  cursor: pointer;
  font-size: 13px;
  color: #6B7280;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  font-family: 'DM Sans', sans-serif;
}

.parent-back:hover {
  color: #2A9D8F;
}

/* Child header on selection page */
.parent-child-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.parent-child-header__left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.parent-child-header__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #E0F2FE;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 18px;
  color: #0C4A6E;
  flex-shrink: 0;
}

.parent-child-header__name {
  font-size: 20px;
  font-weight: 500;
  margin: 0;
  color: #111827;
}

.parent-child-header__meta {
  font-size: 13px;
  color: #6B7280;
  margin: 3px 0 0;
}

.parent-child-header__edit {
  padding: 6px 14px;
  border-radius: 8px;
  border: 0.5px solid #E5E7EB;
  background: transparent;
  font-size: 12px;
  cursor: pointer;
  color: #6B7280;
  font-family: 'DM Sans', sans-serif;
}

.parent-child-header__edit:hover {
  border-color: #D1D5DB;
}

/* Section title */
.parent-service-select__title {
  font-size: 12px;
  font-weight: 500;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 10px;
}

/* Service card */
.parent-service-card {
  background: #FFFFFF;
  border: 0.5px solid #E5E7EB;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.parent-service-card:hover {
  border-color: #D1D5DB;
}

.parent-service-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.parent-service-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.parent-service-card__header-info {
  flex: 1;
  min-width: 0;
}

.parent-service-card__top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.parent-service-card__type {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  color: #111827;
}

.parent-service-card__status {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.parent-service-card__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.parent-service-card__status-dot--active {
  background: #2A9D8F;
}

.parent-service-card__status-dot--paused {
  background: #D97706;
}

.parent-service-card__status-text {
  font-size: 11px;
  color: #6B7280;
}

.parent-service-card__prac {
  font-size: 13px;
  color: #6B7280;
  margin: 3px 0 0;
}

/* Stats row */
.parent-service-card__stats {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.parent-service-card__stat {
  flex: 1;
  background: #F3F4F6;
  border-radius: 8px;
  padding: 8px 10px;
}

.parent-service-card__stat-label {
  font-size: 11px;
  color: #6B7280;
  margin: 0;
}

.parent-service-card__stat-value {
  font-size: 14px;
  font-weight: 500;
  margin: 2px 0 0;
  color: #111827;
}

/* Preview banner */
.parent-service-card__preview {
  background: #E1F5EE;
  border-radius: 8px;
  padding: 10px 12px;
}

.parent-service-card__preview-title {
  font-size: 11px;
  font-weight: 500;
  color: #0F6E56;
  margin: 0 0 3px;
}

.parent-service-card__preview-text {
  font-size: 12px;
  color: #0F6E56;
  margin: 0;
  line-height: 1.5;
}

/* Quiz suggestions */
.parent-quiz-suggest__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.parent-quiz-suggest {
  background: #FFFFFF;
  border: 0.5px solid #2A9D8F;
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.parent-quiz-suggest:hover {
  background: #F0FDF9;
}

.parent-quiz-suggest__icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #E1F5EE;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.parent-quiz-suggest__name {
  font-size: 13px;
  font-weight: 500;
  margin: 0 0 3px;
  color: #111827;
}

.parent-quiz-suggest__link {
  font-size: 12px;
  color: #0F6E56;
  margin: 0;
}

/* ============================================================
   Phase 6C — Parent Inquiries: compact mobile row + detail view
   ============================================================
   Resolves ISSUE-inquiries-001 (contact line wrapping), -002
   (status/date/chevron squeezed), -004 (row not obviously clickable).
   Layout mirrors src/components/inquiry/InquiryDetailPage.astro from
   Phase 3C-2 — the legacy SPA can't import Astro components but
   reproduces the same sections / spacing / status colours.
   ============================================================ */

/* ---- Mobile vs desktop visibility on the inquiry row ----
   Default state (xs/sm): show the compact mobile row, hide the
   existing desktop row. Flipped at md+ in the @media block below. */
.inq-card .inq-row-mobile { display: block; }
.inq-card .inq-row-desktop { display: none; }

@media (min-width: 768px) {
  .inq-card .inq-row-mobile { display: none; }
  .inq-card .inq-row-desktop { display: block; }
}

/* ---- Mobile compact row ---- */
.inq-row-mobile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.inq-row-mobile-name {
  font-weight: 600;
  font-size: 15px;
  color: #111827;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inq-row-mobile-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.inq-row-mobile-date {
  font-size: 12px;
  color: #9CA3AF;
  white-space: nowrap;
}
.inq-row-mobile-chevron {
  /* 44×44 tap target — extends to the row's right edge so there's no
     dead zone between the chevron and the card border (resolves
     ISSUE-inquiries-004). */
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  margin-right: -16px;
  font-size: 18px;
  color: #9CA3AF;
}
.inq-row-mobile-sub {
  margin-top: 4px;
  font-size: 13px;
  color: #6B7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---- Detail view ---- */
.inq-detail {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 4px;
}
.inq-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 24px;
  font-size: 14px;
  color: #6B7280;
  text-decoration: none;
  transition: color 0.15s;
}
.inq-detail-back:hover { color: #1E3A5F; }
.inq-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.inq-detail-name {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 700;
  color: #1E3A5F;
  margin: 0;
}
.inq-detail-credentials,
.inq-detail-practice {
  font-size: 14px;
  color: #6B7280;
  margin: 2px 0 0;
}
.inq-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
.inq-detail-meta {
  background: #F9FAFB;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}
.inq-detail-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 4px 0;
}
.inq-detail-meta-row span:first-child { color: #6B7280; }
.inq-detail-meta-row span:last-child { color: #111827; font-weight: 500; }
.inq-detail-section { margin-bottom: 24px; }
.inq-detail-section-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6B7280;
  margin: 0 0 8px;
}
.inq-detail-body {
  font-size: 15px;
  color: #111827;
  line-height: 1.6;
  margin: 0;
}
.inq-detail-sub {
  font-size: 14px;
  color: #6B7280;
  margin: 0 0 8px;
}
.inq-detail-response {
  background: rgba(204, 251, 241, 0.3);
  border: 1px solid #99F6E4;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}
.inq-detail-decline {
  background: rgba(254, 226, 226, 0.3);
  border: 1px solid #FECACA;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}
.inq-detail-contacts { display: flex; flex-direction: column; gap: 8px; }
.inq-detail-contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 12px 16px;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  font-size: 14px;
  color: #2A9D8F;
  text-decoration: none;
  transition: background 0.15s;
}
.inq-detail-contact-row:hover { background: #E8F5F2; }
.inq-detail-contact-row svg { flex-shrink: 0; }
.inq-detail-primary-btn {
  width: 100%;
  min-height: 44px;
  background: #2A9D8F;
  color: #FFFFFF;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: background 0.15s;
}
.inq-detail-primary-btn:hover { background: #0F6E56; }
.inq-detail-review-link {
  font-size: 14px;
  color: #2A9D8F;
  text-decoration: none;
}
.inq-detail-review-link:hover { text-decoration: underline; }
.inq-detail-profile-link {
  font-size: 14px;
  color: #2A9D8F;
  text-decoration: none;
}
.inq-detail-profile-link:hover { text-decoration: underline; }
