/* ============================================================
   ALO CLINICAL DASHBOARD v3.2
   Design: Warm Desk + Linen Studio synthesis
   Updated: Mar 9, 2026 — Visual design overhaul
   ============================================================ */

/* === RESET === */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* === DESIGN TOKENS === */
:root {
  --cream: #F3EDE4;
  --warm-white: #F8F4EF;
  --sage: #3A7C86;
  --sage-light: #E8F2F3;
  --sage-hover: #2D6B74;
  --charcoal: #2C2622;
  --stone: #5C5A55;

  --bg: var(--cream);
  --white: #FFFEFA;
  --border: rgba(180, 168, 152, 0.28);
  --border-subtle: rgba(180, 168, 152, 0.18);
  --border-strong: rgba(180, 168, 152, 0.42);

  --text: var(--charcoal);
  --text-light: #5C5A55;
  --text-muted: #9B9790;
  --text-label: #7C7870;

  --primary: var(--sage);
  --primary-hover: var(--sage-hover);

  /* Warm accent — clay terracotta (for CTAs that need differentiation) */
  --accent: #C7865F;
  --accent-hover: #B57550;

  --danger: #C45A4D;
  --danger-bg: #FEF2F0;
  --danger-border: #F5C4BF;
  --danger-text: #8B2E24;

  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --warning-text: #92400e;

  --success: #5C9E7A;
  --success-bg: #f0fdf4;
  --success-border: #bbf7d0;

  --info: #2563eb;
  --info-bg: #eff6ff;
  --info-border: #bfdbfe;
  --info-text: #1e40af;

  --shadow-sm: 0 1px 3px rgba(120, 100, 80, 0.06), 0 1px 2px rgba(120, 100, 80, 0.04);
  --shadow-md: 0 4px 12px rgba(120, 100, 80, 0.08);
  --shadow-lg: 0 8px 24px rgba(120, 100, 80, 0.10);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 20px;
}

/* === BASE === */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }

/* === LOGIN PAGE === */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 4px 24px rgba(120, 100, 80, 0.06);
}

.login-logo {
  width: 56px;
  height: 56px;
  background: var(--sage);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 24px;
  margin: 0 auto 16px;
}

.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.login-trust {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.5;
}

.login-form { text-align: left; }

.login-form .form-group {
  margin-bottom: 16px;
}

.login-form label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  margin-bottom: 6px;
}

.login-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
  font-family: inherit;
}

.login-form input:focus {
  outline: none;
  border-color: var(--primary);
}

.login-form input:-webkit-autofill,
.login-form input:-webkit-autofill:hover,
.login-form input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 30px var(--white) inset;
  -webkit-text-fill-color: var(--text);
  border-color: var(--primary);
  transition: background-color 5000s ease-in-out 0s;
}


.login-error {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8125rem;
  margin-bottom: 16px;
  display: none;
}

.login-info {
  background: var(--sage-light);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8125rem;
  color: var(--text);
  margin-bottom: 16px;
  display: none;
}

.login-switch {
  text-align: center;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.login-switch a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.login-switch a:hover {
  text-decoration: underline;
}

/* === HEADER === */
.header {
  background: var(--warm-white);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

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

.home-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.home-icon {
  width: 36px;
  height: 36px;
  background: var(--sage);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 18px;
}

.home-icon svg { width: 20px; height: 20px; }

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}

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

.user-name {
  font-size: 0.875rem;
  font-weight: 500;
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: var(--text);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
}

.logout-btn {
  background: none;
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-light);
  cursor: pointer;
}

.logout-btn:hover { background: var(--bg); }

/* === DISCLAIMER BANNER === */
.disclaimer-banner {
  background: var(--danger-bg);
  border-bottom: 1px solid var(--danger-border);
  padding: 6px 24px;
  font-size: 0.75rem;
  color: var(--text);
  text-align: center;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  z-index: 99;
}

/* === LAYOUT === */
.layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 24px 24px;
}

/* Client detail pages: full-width content, sidebar hidden by default */
.layout.client-page {
  grid-template-columns: 1fr;
}

.layout.client-page .sidebar {
  display: none;
}

.layout.client-page.sidebar-open {
  grid-template-columns: 1fr 260px;
}

.layout.client-page.sidebar-open .sidebar {
  display: block;
}

.main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* === SECTIONS === */
.section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.section-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header-danger { }
.section-header-info { }
.section-header-warning { }

.section-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-icon.danger { background: var(--danger-bg); color: var(--danger); }
.section-icon.warning { background: var(--warning-bg); color: var(--warning); }
.section-icon.info { background: var(--info-bg); color: var(--info); }
.section-icon svg { width: 16px; height: 16px; }

.section-title { font-size: 0.875rem; font-weight: 600; }

.section-count {
  margin-left: auto;
  background: var(--bg);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
}

.section-count-danger { background: var(--danger-bg); color: var(--danger); }
.section-count-info { background: var(--info-bg); color: var(--info); }
.section-count-warning { background: var(--warning-bg); color: var(--warning); }

.section-body { padding: 8px; }

.section-empty {
  padding: 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.section-view-all {
  display: block;
  width: 100%;
  padding: 10px;
  background: none;
  border: none;
  border-top: 1px solid var(--border-subtle);
  color: var(--sage);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  margin-top: 4px;
}

.section-view-all:hover {
  background: rgba(58, 124, 134, 0.04);
}

/* Feed sub-labels (ALERTS / MESSAGES within Needs Attention) */
.feed-sub-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 16px 4px;
}

.feed-sub-crisis { color: #dc2626; }
.feed-sub-messages { color: #4A90D9; border-top: 1px solid var(--border-subtle); margin-top: 4px; padding-top: 10px; }

/* Client Pulse card */
.pulse-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-radius: 8px;
}

.pulse-item:hover { background: var(--bg); }

.pulse-item + .pulse-item { border-top: 1px solid var(--border-subtle); }

.pulse-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: rgba(58, 124, 134, 0.06);
  border: 1.5px solid rgba(58, 124, 134, 0.16);
  color: var(--sage);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.6875rem;
  flex-shrink: 0;
}

.pulse-content { flex: 1; min-width: 0; }

.pulse-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--charcoal);
}

.pulse-hw {
  font-weight: 500;
  font-size: 0.6875rem;
  color: var(--sage);
  background: rgba(58, 124, 134, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: 4px;
}

.pulse-detail {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.pulse-more {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  padding: 8px;
}

/* === LIST ITEMS === */
.list-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.list-item:hover { background: var(--bg); }

.list-item-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.list-item-indicator.danger { background: var(--danger); }
.list-item-indicator.warning { background: var(--warning); }
.list-item-indicator.success { background: var(--success); }
.list-item-indicator.info { background: var(--info); }

.list-item-content { flex: 1; min-width: 0; }

.list-item-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.list-item-description {
  font-size: 0.8125rem;
  color: var(--text-light);
}

.list-item-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.list-item-action {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
}

.list-item-action:hover { background: var(--border); }
/* === SIDEBAR === */
.sidebar {
  position: sticky;
  top: 108px;
  height: fit-content;
}

.sidebar-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

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

.sidebar-title { font-size: 0.875rem; font-weight: 600; }

.sidebar-list {
  max-height: calc(100vh - 240px);
  overflow-y: auto;
}

.client-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border);
}

.client-item:last-child { border-bottom: none; }
.client-item:hover { background: var(--bg); }
.client-item.active { background: rgba(58, 124, 134, 0.08); color: var(--text); }
.client-item.active .client-name { color: var(--text); }
.client-item.active .client-meta { color: var(--text-light); }

.client-avatar {
  width: 40px;
  height: 40px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
  flex-shrink: 0;
  position: relative;
}

.client-item.active .client-avatar { background: rgba(58, 124, 134, 0.12); color: var(--sage); }

.status-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--white);
}

.client-item.active .status-badge { border-color: rgba(58, 124, 134, 0.08); }
.status-badge.crisis { background: var(--danger); animation: pulse 2s infinite; }
.status-badge.needs-attention { background: var(--warning); }
.status-badge.stable { background: var(--success); }
.status-badge.dormant { background: var(--text-muted); }

@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { transform: scale(1.1); box-shadow: 0 0 0 4px rgba(239, 68, 68, 0); }
}

.client-info { flex: 1; min-width: 0; }

.client-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.client-name {
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.client-meta { font-size: 0.75rem; color: var(--text-muted); }


/* Weather Pills */
.weather-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.625rem;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 10px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.weather-crisis { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.weather-attention { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.weather-stable { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.weather-dormant { background: var(--bg); color: var(--text-muted); border-color: var(--border); }

/* === CLIENT DETAIL PAGE === */
.client-page { display: none; }
.client-page.active { display: grid; }

.page-header { margin-bottom: 8px; }

.page-title {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.page-meta { font-size: 0.875rem; color: var(--text-light); }

/* === TABS === */
.tabs {
  display: flex;
  gap: 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border-subtle);
  border-radius: 0;
  padding: 0;
  margin-bottom: 20px;
}

.tab {
  flex: none;
  padding: 12px 2px;
  margin-right: 20px;
  border: none;
  background: none;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 120ms ease, border-color 120ms ease;
}

.tab:hover { color: var(--text-light); }
.tab.active { color: var(--charcoal); border-bottom: 3px solid var(--sage); font-weight: 600; }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* === CARDS === */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 140ms ease-out, box-shadow 140ms ease-out, border-color 140ms ease-out;
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
  }
}

.card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title { font-size: 0.9375rem; font-weight: 600; }

.card-body { padding: 24px; }
.card-body p { font-size: 0.875rem; margin-bottom: 12px; }
.card-body p:last-child { margin-bottom: 0; }

.highlight-box {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.875rem;
  margin-bottom: 16px;
}

/* === PREP SUMMARY STRIP === */
.prep-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.prep-signal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  background: var(--bg);
  border-radius: var(--radius-md);
}

.prep-signal-value {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--charcoal);
  line-height: 1;
}

.prep-signal-value.danger { color: var(--danger); }
.prep-signal-value.warning { color: var(--warning); }

.prep-signal-label {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
}

/* === MORNING GREETING === */
.morning-greeting {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--charcoal);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.morning-summary {
  font-size: 0.9375rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

/* === SESSION PREVIEW & NOTES === */
.session-preview { padding: 12px 0; }
.session-preview-border { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 16px; }
.session-preview-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.session-preview-date { font-size: 0.875rem; font-weight: 600; }
.session-preview-type { font-size: 0.75rem; color: var(--text-muted); background: var(--bg); padding: 2px 8px; border-radius: 4px; }
.session-preview-text { font-size: 0.8125rem; color: var(--text-light); margin-bottom: 4px; line-height: 1.5; }
.session-preview-text:last-child { margin-bottom: 0; }
.session-preview-text strong { color: var(--text); }

.note-card { background: var(--bg); border-radius: var(--radius-md); padding: 16px; margin-bottom: 12px; }
.note-card:last-child { margin-bottom: 0; }
.note-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.note-date { font-size: 0.875rem; font-weight: 600; }
.note-content p { font-size: 0.8125rem; color: var(--text-light); margin-bottom: 8px; line-height: 1.6; }
.note-content p:last-child { margin-bottom: 0; }
.note-content strong { color: var(--text); }

/* === EXCERPTS === */
.excerpt {
  padding: 12px 16px;
  background: var(--bg);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}
.excerpt:last-child { margin-bottom: 0; }
.excerpt-time { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 4px; }
.excerpt-text { font-size: 0.875rem; font-style: italic; }

/* === HOMEWORK === */
.homework-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
}
.homework-item:last-child { margin-bottom: 0; }

.homework-status {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.875rem;
}

.homework-status.active { background: var(--warning-bg); color: var(--warning); }
.homework-status.completed { background: var(--success-bg); color: var(--success); }

.homework-content { flex: 1; }
.homework-type { font-size: 0.875rem; font-weight: 600; margin-bottom: 4px; }
.homework-desc { font-size: 0.8125rem; color: var(--text-light); }
.homework-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 6px; }

/* === TEMPLATES === */
.templates { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.template-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-xl);
  font-size: 0.8125rem;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.15s;
}

.template-btn:hover { background: var(--sage); border-color: var(--sage); color: white; }

/* === CRISIS ALERTS === */
.crisis-alert-item {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.crisis-alert-item:last-child { margin-bottom: 0; }
.crisis-alert-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.crisis-alert-time { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; }
.crisis-alert-severity { font-size: 0.75rem; font-weight: 600; color: var(--danger); }
.crisis-alert-detail { font-size: 0.875rem; color: var(--text); line-height: 1.5; }

/* === SIMPLEPRACTICE COPY BUTTONS === */
.sp-section-buttons { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }

.sp-section-btn {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.15s;
}

.sp-section-btn:hover { background: var(--sage-light); border-color: var(--sage); color: var(--sage); }
.sp-section-btn.copied { background: var(--success-bg); border-color: var(--success); color: var(--success); }

/* === FORMS === */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.8125rem; font-weight: 500; }

.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(58, 124, 134, 0.12);
}

.form-group textarea { min-height: 80px; resize: vertical; }
.form-hint { font-size: 0.75rem; color: var(--text-muted); }

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

/* === BUTTONS === */
.btn {
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--sage); color: white; }

.btn-primary:hover {
  background: var(--sage-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(58, 124, 134, 0.3);
}

.btn-secondary { background: var(--warm-white); border: 1px solid var(--border); color: var(--text); }
.btn-secondary:hover { background: var(--sage-light); border-color: var(--sage); }
.btn-sm { padding: 6px 12px; font-size: 0.8125rem; }
.btn-full { width: 100%; justify-content: center; }
.add-note-btn { white-space: nowrap; }

/* === MODALS === */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(29, 53, 57, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
  padding: 24px;
  overflow-y: auto;
}

.modal-overlay.show { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modalSlideIn 0.2s ease;
}

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

.modal-header h3 { font-size: 1.125rem; font-weight: 600; }

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-close:hover { color: var(--text); }

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.modal-body .form-group { margin-bottom: 16px; }
.modal-body .form-group:last-child { margin-bottom: 0; }

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

/* === SETTINGS & TOGGLES === */
.settings-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.settings-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--bg);
}

.setting-row:last-child { border-bottom: none; }
.setting-label { font-size: 0.8rem; color: var(--text); }
.setting-hint { font-size: 0.7rem; color: var(--text-muted); margin-top: 2px; }

.toggle { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #ccc;
  border-radius: 24px;
  transition: 0.2s;
}

.toggle-slider:before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.2s;
}

.toggle input:checked + .toggle-slider { background: var(--sage); }
.toggle input:checked + .toggle-slider:before { transform: translateX(20px); }
.toggle input:disabled + .toggle-slider { opacity: 0.5; cursor: not-allowed; }

.settings-default-note {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 8px;
  padding: 6px 8px;
  background: var(--bg);
  border-radius: 4px;
}

/* === TOAST === */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--charcoal);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  display: none;
  align-items: center;
  gap: 8px;
  z-index: 1100;
  animation: slideUp 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.toast.show { display: flex; }
.toast svg { width: 18px; height: 18px; color: #4ade80; }

/* === TOOLTIP === */
.tooltip-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

.tooltip-icon {
  width: 16px;
  height: 16px;
  background: var(--border);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-light);
  cursor: help;
  flex-shrink: 0;
}

.tooltip-icon:hover { background: var(--stone); color: white; }

.tooltip-content {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--charcoal);
  color: white;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.5;
  width: 260px;
  z-index: 500;
  box-shadow: var(--shadow-lg);
}

.tooltip-content::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--charcoal);
}

.tooltip-trigger:hover .tooltip-content { display: block; }

/* === INVITE & BADGES === */
.invite-display {
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  margin: 16px 0;
}

.invite-code {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin: 8px 0;
  cursor: pointer;
}

.invite-code:hover { color: var(--primary-hover); }
.invite-hint { font-size: 0.8125rem; color: var(--text-muted); }

.invite-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: var(--warning-text);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.invite-badge:hover { background: var(--warning-border); }

.pending-label { font-size: 0.7rem; color: var(--warning); font-weight: 500; }

/* === WHAT CHANGED BADGES === */
.change-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
}

.change-badge.new { background: var(--success-bg); color: #166534; }
.change-badge.changed { background: var(--warning-bg); color: var(--warning-text); }
.change-badge.alert { background: var(--danger-bg); color: var(--danger-text); }
.change-badge.unchanged { background: #f3f4f6; color: #6b7280; }

#prepSummary { border-left: 3px solid var(--sage); }

/* === LOADING & COPY BUTTON === */
.loading { text-align: center; padding: 32px; color: var(--text-muted); }

.spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 8px;
}

.copy-btn {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--text-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.copy-btn:hover { background: var(--bg); }
.copy-btn.copied { background: var(--success-bg); border-color: var(--success); color: var(--success); }
.copy-btn svg { width: 12px; height: 12px; }

/* === SIDEBAR BACKDROP === */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(29, 53, 57, 0.3);
  z-index: 199;
  opacity: 0;
  transition: opacity 0.3s;
}

.sidebar-backdrop.show { display: block; opacity: 1; }

/* Hidden on desktop */
.header-clients-btn { display: none; }
.sidebar-close-btn { display: none; }
.homework-mobile-hint { display: none; }
.note-quick-capture { display: none; }

/* === FOCUS & ACCESSIBILITY === */
:focus-visible { outline: 3px solid var(--charcoal); outline-offset: 2px; }

/* === UTILITY CLASSES === */
.text-muted-center { color: var(--text-muted); text-align: center; }

/* === SIDEBAR HEADER LAYOUT === */
.sidebar-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-header-actions {
  display: flex;
  gap: 4px;
}

.sidebar-settings-btn { padding: 4px 8px; font-size: 0.75rem; }
.sidebar-invite-btn { padding: 4px 10px; font-size: 0.75rem; }

.sidebar-footer {
  padding: 8px 16px 12px;
  border-top: 1px solid var(--border-subtle);
}

.sidebar-archived-link {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-decoration: none;
}

.sidebar-archived-link:hover {
  color: var(--sage);
  text-decoration: underline;
}

/* === PAGE HEADER LAYOUT === */
.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Crisis alert button in page header */
.crisis-alert-btn {
  display: none;
  background: var(--danger);
  color: white;
  border: none;
  animation: pulse 2s infinite;
}

.crisis-alert-btn.visible { display: inline-flex; }

/* Crisis card header */
.card-header-danger {
  background: var(--danger-bg);
  border-bottom-color: var(--danger-border);
}

.card-title-danger {
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 8px;
}

.crisis-count-badge {
  background: var(--danger);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* Default settings modal intro */
.modal-intro {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Emergency section title */
.emergency-title { color: var(--danger); }

/* Danger zone */
.danger-zone {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.danger-zone-label { color: var(--danger); }

.btn-danger-outline {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
  margin-top: 8px;
}

/* Quick note capture */
.quick-note-inner {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.quick-note-label {
  font-size: 0.8125rem;
  font-weight: 500;
  display: block;
  margin-bottom: 6px;
}

.quick-note-textarea {
  width: 100%;
  min-height: 60px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 16px;
  font-family: inherit;
  resize: vertical;
}

.quick-note-save { margin-top: 8px; }

.quick-note-hint {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.client-signals { display: none; }

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

@keyframes modalSlideIn {
  from { transform: translateY(-10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* === THIS WEEK GLANCE === */
.glance-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
}

.glance-row + .glance-row {
  border-top: 1px solid var(--bg);
}

.glance-icon {
  width: 20px;
  text-align: center;
  font-size: 0.875rem;
  flex-shrink: 0;
  line-height: 1.5;
}

.glance-icon.danger { color: var(--danger); }
.glance-icon.warning { color: var(--warning); }
.glance-icon.success { color: var(--success); }
.glance-icon.info { color: var(--info); }
.glance-icon.muted { color: var(--text-muted); }

.glance-text {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.5;
}

.glance-danger { color: var(--danger); }

.glance-plan .glance-text {
  color: var(--text-light);
  font-size: 0.8125rem;
  font-style: italic;
}

.glance-hw-row .glance-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.glance-hw-summary {
  font-weight: 500;
}

.glance-hw-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.glance-hw {
  font-size: 0.8125rem;
  padding: 2px 8px;
  border-radius: 6px;
}

.glance-hw.done {
  background: var(--success-bg);
  color: var(--success);
}

.glance-hw.open {
  background: var(--warning-bg);
  color: var(--warning);
}

/* === CALENDAR WIDGET === */

/* Sticky client header (all screen sizes) */
/* client-sticky-header styles moved to bottom of file with redesign */

/* Homework zone: stacked vertically (notes-dominant layout) */
.homework-zone {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* In Session: side-by-side rows (main content + side panel) */
.tools-row {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.tools-row-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.tools-row-side { min-width: 0; position: sticky; top: 140px; }

/* Session Prep: 50/50 split row */
.prep-half-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

/* Session Prep: prominent action bar */
.prep-action-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

/* Sidebar search filter */
.sidebar-search {
  padding: 0 16px 8px;
}

.sidebar-search input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  background: var(--white);
  color: var(--text);
  outline: none;
}

.sidebar-search input:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 2px rgba(58, 124, 134, 0.1);
}

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

/* Compact homework history items */
.hw-compact { cursor: pointer; }
.hw-compact .hw-detail { display: none; }
.hw-compact.hw-expanded .hw-detail { display: block; }
.hw-compact .homework-type { font-size: 0.8125rem; }
.hw-compact .homework-type-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Template picker dropdown */
.template-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 0;
}

.template-picker-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.template-picker-select {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  background: var(--white);
  color: var(--text);
  cursor: pointer;
}

/* Quick note — sticky at bottom of scroll in tools-row-main */
.quick-note-sticky {
  position: sticky;
  bottom: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 -2px 8px rgba(120, 100, 80, 0.08);
  padding: 12px 16px;
  margin-top: -1px;
  z-index: 10;
}

.quick-note-sticky .quick-note-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.quick-note-sticky .quick-note-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.quick-note-sticky .quick-note-textarea {
  min-height: 48px;
  resize: vertical;
  font-size: 0.8125rem;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.quick-note-sticky .quick-note-save {
  align-self: flex-end;
}

.quick-note-sticky .quick-note-hint {
  display: none;
}

.homework-zone-form { min-width: 0; }
.homework-zone-sidebar { min-width: 0; display: flex; flex-direction: column; gap: 14px; }

/* Month calendar */
.cal-month-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  margin-bottom: 4px;
}

.cal-month-day-label {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 4px 0;
}

.cal-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.cal-month-cell {
  text-align: center;
  padding: 4px 2px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  min-height: 32px;
}

.cal-month-cell:hover { background: var(--bg); }
.cal-month-cell.cal-today { background: var(--bg); border: 2px solid var(--primary); font-weight: 700; }
.cal-month-cell.cal-future { opacity: 0.4; }
.cal-month-cell.cal-empty { cursor: default; }

.cal-month-num {
  font-size: 0.75rem;
  line-height: 1;
}

.cal-nav-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 8px;
  color: var(--text-muted);
  line-height: 1;
}
.cal-nav-btn:hover { color: var(--text); }

/* Scrollable 7-day strip (Session Prep) */
.calendar-strip {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.calendar-strip::-webkit-scrollbar { height: 4px; }
.calendar-strip::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.cal-strip-day {
  flex: 0 0 56px;
  text-align: center;
  padding: 6px 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
}

.cal-strip-day:hover { background: var(--bg); }

.cal-strip-month {
  font-size: 0.5625rem;
  font-weight: 700;
  color: var(--sage);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
  height: 12px;
  line-height: 12px;
}

.cal-strip-month-spacer {
  height: 12px;
  margin-bottom: 2px;
}

.cal-day, .cal-strip-day {
  min-width: 0;
}

.cal-today {
  background: var(--bg);
  border: 2px solid var(--primary);
  font-weight: 600;
}

.cal-label {
  font-size: 0.625rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cal-num {
  font-size: 1rem;
  font-weight: 600;
  margin: 2px 0;
}

.cal-dots {
  display: flex;
  gap: 2px;
  justify-content: center;
  min-height: 6px;
}

.cal-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  display: inline-block;
}

.calendar-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 4px 0;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 0.625rem;
  color: var(--text-muted);
}

.legend-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.calendar-detail {
  background: var(--bg);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 6px;
  font-size: 0.8125rem;
}

.cal-detail-header { font-weight: 600; margin-bottom: 4px; }
.cal-detail-item { color: var(--text-muted); padding: 2px 0; }

/* Drawer filters */
.drawer-filters {
  display: flex;
  gap: 8px;
  padding: 8px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.drawer-filters select {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.8125rem;
  background: var(--white);
}

/* Calendar day popup */
.cal-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  padding: 20px;
  max-width: 400px;
  width: 90vw;
  max-height: 70vh;
  overflow-y: auto;
  z-index: 500;
  animation: popIn 0.15s ease-out;
}

@keyframes popIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.cal-popup-header {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 12px;
  padding-right: 24px;
}

.cal-popup-section {
  margin-bottom: 10px;
}

.cal-popup-label {
  font-weight: 600;
  font-size: 0.8125rem;
  margin-bottom: 4px;
}

.cal-popup-item {
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding: 3px 0 3px 16px;
  border-left: 2px solid var(--border);
  margin-bottom: 2px;
}

.cal-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.125rem;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 4px;
}
.cal-popup-close:hover { color: var(--text); }

/* === DRAWER === */

.note-section {
  margin-bottom: 10px;
  line-height: 1.5;
}

.note-section .sp-section-btn {
  vertical-align: middle;
  margin-right: 6px;
}

.note-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.note-meta + .note-meta {
  border-top: none;
  padding-top: 0;
  margin-top: 2px;
}

.drawer {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modalSlideIn 0.2s ease;
}

.drawer-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.drawer-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  min-height: 0;
}

.drawer-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.hw-drawer-item {
  display: flex;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}


/* === PHONE === */
@media (max-width: 767px) {
/* Layout */
.layout {
grid-template-columns: 1fr;
gap: 16px;
padding: 68px 16px 16px;

}
.main { gap: 16px; }

/* Header compact */
.header {
height: 52px;
padding: 0 16px;
}
.disclaimer-banner {
top: 52px;
padding: 4px 16px;
font-size: 0.6875rem;
}
.logo-text { font-size: 1.125rem; }
.home-icon { width: 32px; height: 32px; font-size: 16px; }
.home-icon svg { width: 18px; height: 18px; }
.user-name { display: none; }
.logout-btn { font-size: 0.6875rem; padding: 4px 8px; }

/* Show clients toggle */
.header-clients-btn {
display: inline-flex;
align-items: center;
gap: 6px;
background: none;
border: 1px solid var(--border);
padding: 6px 12px;
border-radius: 8px;
font-size: 0.8125rem;
font-weight: 500;
color: var(--text);
cursor: pointer;
min-height: 36px;
}
.header-clients-btn.has-alerts::after {
content: '';
width: 8px;
height: 8px;
background: #DC2626;
border-radius: 50%;
}

/* FIX 3: Sidebar - translate3d + visibility */
.sidebar {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 300;
background: var(--bg);
transform: translate3d(100%, 0, 0);
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
overflow-y: auto;
padding: 0;
max-width: 100%;
visibility: hidden;
pointer-events: none;
}
.sidebar.open {
transform: translate3d(0, 0, 0);
visibility: visible;
pointer-events: auto;
}
.sidebar-section {
border-radius: 0;
border: none;
min-height: 100vh;
}
.sidebar-close-btn {
display: block;
background: none;
border: none;
font-size: 1.5rem;
color: var(--text-muted);
cursor: pointer;
padding: 4px;
}

/* Richer client cards on phone */
.client-item {
padding: 16px;
min-height: 64px;
gap: 14px;
align-items: flex-start;
}
.client-avatar { width: 44px; height: 44px; font-size: 0.875rem; }
.client-name { font-size: 0.9375rem; font-weight: 600; }
.client-signals { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.client-signal-chip {
font-size: 0.6875rem;
padding: 2px 6px;
border-radius: 4px;
font-weight: 600;
background: var(--bg);
}

/* Morning greeting compact */
.morning-greeting {
font-size: 1.125rem;
margin-bottom: 2px;
}
.morning-summary {
font-size: 0.8125rem;
margin-bottom: 16px;
}

/* Hide empty sections */
.section.is-empty { display: none; }

/* Prep summary strip: 2x2 grid */
.prep-summary-strip {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 10px;
padding: 12px;
}
.prep-summary-strip > * { min-width: 0; }
.prep-signal {
padding: 10px 8px;
background: var(--white);
border: 1px solid var(--border);
border-radius: 8px;
min-height: 44px;
}
.prep-signal-value { font-size: 1.125rem; }

/* Tabs: sticky, full-width, larger targets */
.tabs {
position: sticky;
top: 96px;
z-index: 50;
background: var(--bg);
margin-bottom: 16px;
}
.tab {
padding: 14px 2px;
margin-right: 16px;
font-size: 0.8125rem;
min-height: 44px;
}
/* Sticky client header: phone margins handled in redesign block */

@media (max-width: 767px) {
  /* tools-row and prep-half-row stack on mobile */
  .tools-row,
  .prep-half-row {
    grid-template-columns: 1fr;
  }
  .tools-row-side {
    position: static;
  }
}

/* Sections compact */

.section-header { padding: 12px 16px; }
.section-title { font-size: 0.8125rem; }

/* Cards compact */
.card { margin-bottom: 12px; }
.card-header { padding: 14px 16px; }
.card-body { padding: 16px; }

/* Touch targets: all interactive elements */
.btn {
min-height: 44px;
padding: 12px 16px;
font-size: 0.875rem;
}
.btn-sm {
min-height: 40px;
padding: 10px 14px;
}
.list-item {
padding: 14px 16px;
min-height: 52px;
}
.homework-item { padding: 16px; }
.template-btn {
padding: 10px 16px;
min-height: 40px;
font-size: 0.875rem;
}
.copy-btn {
padding: 8px 12px;
min-height: 36px;
}
.change-badge {
font-size: 0.8125rem;
padding: 4px 10px;
}
.toggle { margin: 4px 0; }

/* Forms: single column, prevent iOS zoom */
.form-grid { grid-template-columns: 1fr; gap: 12px; }
.form-group textarea { min-height: 100px; }
.form-group input,
.form-group select,
.form-group textarea {
font-size: 16px;
padding: 12px;
min-height: 44px;
}
.form-group label { font-size: 0.875rem; }

/* Sticky save button */
.form-actions {
position: sticky;
bottom: 0;
background: var(--white);
padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
margin: 0;
width: 100%;
border-top: 1px solid var(--border);
z-index: 10;
flex-direction: column-reverse;
}
.form-actions .btn { width: 100%; }

/* Note editor: mobile quick note */
.quick-note-sticky {
position: static;
border: 1px dashed var(--border);
background: var(--warm-white);
border-radius: 12px;
padding: 16px;
box-shadow: none;
}

/* Homework: hide custom form, keep templates */
#homeworkForm .form-grid { display: none; }
#homeworkForm .form-actions { display: none; }
.homework-mobile-hint {
display: block;
font-size: 0.8125rem;
color: var(--text-muted);
text-align: center;
padding: 12px;
font-style: italic;
}

/* Copy-for-EHR: hide on phone */
.copy-btn:has(svg) { display: none; }
.ehr-format-menu { display: none; }
/* Keep delete button visible */
.note-header .copy-btn:last-child { display: flex; }

/* Modals + drawers: convert to bottom sheets on mobile */
.modal-overlay { align-items: flex-end; padding: 0; }
.modal,
.drawer {
max-width: 100%;
border-radius: 16px 16px 0 0;
max-height: 90vh;
animation: sheetSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-header::before,
.drawer-header::before {
content: '';
display: block;
width: 36px;
height: 4px;
background: #D1D5DB;
border-radius: 2px;
margin: 0 auto 12px;
}
.modal-header { padding: 12px 20px 16px; }
.drawer-header { padding: 12px 20px 16px; }
.modal-body { padding: 16px 20px; }
.drawer-body { padding: 16px 20px; }
.modal-footer {
padding: 12px 20px;
padding-bottom: calc(12px + env(safe-area-inset-bottom));
flex-direction: column-reverse;
}
.modal-footer .btn { width: 100%; }

/* Toast: move above bottom sheet area */
.toast { bottom: 16px; right: 16px; left: 16px; }

@keyframes sheetSlideUp {
from { transform: translateY(100%); }
to { transform: translateY(0); }
}

/* Page header compact */
.page-header { margin-bottom: 16px; }
.page-title { font-size: 1.125rem; }
}

/* Hide signal chips on desktop — sidebar too narrow */
@media (min-width: 768px) {
.client-signals { display: none; }
}

@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { transition: none !important; animation: none !important; }
}

/* === PRODUCTION OVERRIDES v1 === */

/* Fix 1: Header - prevent overlap on phone */
@media (max-width: 767px) {
  .header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 12px;
  }
  .header-left {
    flex: 0 0 auto;
  }
  .logo-text {
    display: none;
  }
  .header-clients-btn {
    flex: 0 0 auto;
    order: 0;
  }
  .header-right {
    flex: 0 0 auto;
    margin-left: auto;
  }
}

/* Fix 2: Section card shadows */
.section {
  box-shadow: var(--shadow-sm);
}

/* Fix 3: Section spacing handled by card clusters now */

/* Fix 4: Prep summary strip */
.prep-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.prep-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  background: var(--bg);
  border-radius: 8px;
}

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

.prep-stat-label {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* Fix 5: Morning greeting spacing */
.morning-greeting {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.morning-summary {
  font-size: 0.9375rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

/* Fix 6: Font fallback (Google Fonts blocked on iOS) */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
}

/* Fix 7: Page header spacing */
.page-header {
  margin-bottom: 8px;
}

/* Fix 8: Sidebar card shadow */
.sidebar-section {
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   UX HIERARCHY PASS v1.0
   Purpose: Create clear visual priority tiers for therapist workflow
   
   Tier 1 (ACT NOW): Crisis alerts — red accents, elevated shadow
   Tier 2 (REVIEW): This Week glance, What Changed — prominent cards
   Tier 3 (REFERENCE): Session Notes, Messages, History — standard cards
   Tier 4 (TOOLS): Homework form, Settings — recessed/quiet
   ============================================================ */

/* === HOMEPAGE: DIFFERENTIATED SECTIONS === */

/* Crisis section gets elevated treatment */
.section#alertsSection {
  border: 1px solid var(--danger-border);
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.08);
}

.section#alertsSection .section-header {
  background: var(--danger-bg);
}

/* Messages section: subtle info tint */
.section#messagesSection .section-header {
  background: var(--info-bg);
}

/* Triage: subtle warning tint */
.section#triageSection .section-header {
  background: var(--warning-bg);
}

/* When alerts count is 0, dial back the urgency */
.section#alertsSection:has(.section-empty) {
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.section#alertsSection:has(.section-empty) .section-header {
  background: transparent;
}

/* === CLIENT DETAIL: TIERED CARD HIERARCHY === */

/* Tier 1: "This Week" glance card — the hero card */
#weekGlanceCard {
  border: 1px solid rgba(58, 124, 134, 0.18);
  border-left: 3px solid var(--sage);
  box-shadow: 0 2px 12px rgba(120, 100, 80, 0.08);
}

#weekGlanceCard .card-header {
  background: rgba(58, 124, 134, 0.04);
}

#weekGlanceCard .card-title {
  color: var(--sage-hover);
  font-weight: 700;
}

/* Tier 2: "What Changed" — already has left border, enhance it */
#prepSummary {
  border-left: 4px solid var(--sage);
  padding-left: 16px;
}

/* Copy Prep Pack: make it a standout action */
#copyPrepPackBtn {
  background: var(--charcoal);
  color: white;
  font-weight: 600;
}

#copyPrepPackBtn:hover {
  background: #1a1815;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(120, 100, 80, 0.18);
}

/* Tier 4: Open Items and Messages in prep — quieter */
#prepOpenItems,
#clientMessagesPrep {
  font-size: 0.8125rem;
}

/* === HOMEPAGE GREETING: COMPACT + ACTIONABLE === */

/* Reduce greeting dominance, add summary emphasis */
.morning-greeting {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-light);
}

.morning-summary {
  font-size: 1rem;
  font-weight: 600;
  color: var(--charcoal);
}

/* === SESSION TOOLS: GROUP VISUALLY === */

/* Notes card: primary action — dominant button */
.add-note-btn {
  background: var(--sage);
  color: white;
  font-size: 0.875rem;
  padding: 8px 16px;
  font-weight: 600;
}

.add-note-btn:hover {
  background: #2C6069;
}

/* Homework templates: warmer background to invite interaction */
.templates {
  background: var(--warm-white);
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

/* === CRISIS: IMPOSSIBLE TO MISS === */

/* Crisis alerts card in Session Tools — elevated */
#crisisAlertsCard {
  border: 2px solid var(--danger);
  box-shadow: 0 4px 16px rgba(196, 90, 77, 0.10);
}

/* Crisis alert button: already pulsing, add glow */
.crisis-alert-btn.visible {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

/* === SIDEBAR: ACTIVE CLIENT STRONGER === */
.client-item.active {
  background: rgba(58, 124, 134, 0.08);
  border-left: 3px solid var(--sage);
}

/* Crisis client in sidebar: red left accent */
.client-item.status-crisis {
  border-left: 3px solid var(--danger);
}

.client-item.status-needs-attention {
  border-left: 3px solid var(--warning);
}

/* === SPACING: VISUAL GROUPS === */

/* Add subtle group separator between prep cards */
#tab-prep .card:nth-child(2) {
  margin-top: 8px;
}

/* Session Tools: add breathing room between card groups */
#tab-tools .card + .card {
  margin-top: 4px;
}

/* Add stronger separation before crisis card */
#crisisAlertsCard {
  margin-top: 24px;
}

/* === EMPTY STATES: QUIETER === */
.text-muted-center {
  font-size: 0.8125rem;
  padding: 24px 16px;
  opacity: 0.7;
}

/* === DISCLAIMER BANNER: LESS DOMINANT === */
.disclaimer-banner {
  font-size: 0.6875rem;
  padding: 4px 24px;
  background: #fef9ee;
  border-bottom-color: #fde68a;
  color: var(--text-muted);
}

/* === FOCUS STATES FOR KEYBOARD NAV === */
.tab:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: -2px;
}

.client-item:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: -2px;
}

.list-item:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: -2px;
}

/* === TEXT HIERARCHY: CARD TITLES AS LABELS WITH TEAL DASH === */

/* Card titles: title case with teal dash accent */
.card-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.01em;
  color: var(--text-label, #7C7870);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 2px;
  background: var(--sage);
  border-radius: 1px;
  flex-shrink: 0;
}

/* Section titles on homepage: same treatment */
.section-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.01em;
  color: var(--text-label, #7C7870);
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 2px;
  background: var(--sage);
  border-radius: 1px;
  flex-shrink: 0;
}

/* Note dates: these ARE the content — make them the loudest */
.note-date {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--charcoal);
}

/* SOAP labels inside notes: medium weight, distinct from body */
.note-content strong {
  color: var(--charcoal);
  font-weight: 600;
}

/* Note body text: slightly lighter so labels pop */
.note-content p {
  color: var(--text-light);
}

/* Session preview dates in prep tab: also loud */
.session-preview-date {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--charcoal);
}

/* Keep crisis card title red and loud — exception to the label pattern */
.card-title-danger {
  font-size: 0.875rem;
  text-transform: none;
  letter-spacing: normal;
  color: var(--danger);
}

.card-title-danger::before {
  background: var(--danger);
}

/* This Week card title: sage accent */
#weekGlanceCard .card-title {
  color: var(--sage-hover);
  font-size: 0.8125rem;
  text-transform: none;
  letter-spacing: 0.01em;
}

/* Homework type name: this is the content, keep it strong */
.homework-type {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--charcoal);
}

/* ============================================================
   PRE-PILOT POLISH — March 2026
   Batches 3-6: Loading states, note actions, EHR dropdown
   ============================================================ */

/* === BUTTON LOADING STATE === */
.btn-loading {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
  vertical-align: middle;
}

.btn-secondary .btn-spinner {
  border-color: rgba(0,0,0,0.15);
  border-top-color: var(--charcoal);
}

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

/* === NOTE ACTIONS (edit, delete, EHR copy) === */
.note-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.note-action-btn {
  min-height: 36px;
  min-width: 36px;
  font-size: 0.75rem;
  padding: 4px 10px;
}

.note-type-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--cream);
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

/* === EHR FORMAT DROPDOWN === */
.ehr-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 100;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(120, 100, 80, 0.12);
  min-width: 120px;
  overflow: hidden;
}

.ehr-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  font-size: 0.8125rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  min-height: 44px;
}

.ehr-dropdown button:hover {
  background: var(--sage-light);
}

.ehr-dropdown button:not(:last-child) {
  border-bottom: 1px solid var(--border-subtle);
}

/* Mobile: bottom-sheet style for EHR dropdown */
@media (max-width: 767px) {
  .note-actions {
    width: 100%;
    justify-content: flex-end;
    margin-top: 8px;
  }

  .note-action-btn {
    min-height: 44px;
    padding: 8px 12px;
    font-size: 0.8125rem;
  }

  .ehr-dropdown {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 24px rgba(120, 100, 80, 0.15);
    min-width: unset;
  }

  .ehr-dropdown button {
    padding: 16px 20px;
    font-size: 1rem;
    text-align: center;
    min-height: 52px;
  }
}

/* === FORGOT PASSWORD / RESET MODAL reuses existing modal styles === */
/* login-error and login-info styles already exist, used inside modals too */

/* === CLIENT DETAIL HEADER === */
.client-sticky-header .client-detail-header {
  display: flex !important;
  flex-direction: row !important;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0 6px;
}

.client-sticky-header .client-detail-header .page-title {
  margin: 0;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--charcoal);
  white-space: nowrap;
  flex-shrink: 0;
  width: auto;
  display: inline;
}

.client-detail-right {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-light);
  white-space: nowrap;
  margin-left: auto;
  flex-shrink: 1;
}

.client-detail-meta {
  margin: 0;
}

.client-detail-sep {
  color: var(--border-strong, #aaa);
}

.client-edit-link {
  color: var(--sage);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.client-edit-link:hover {
  text-decoration: underline;
}

/* Sticky header: single unified bar with outline */
.client-sticky-header {
  position: sticky;
  top: 60px;
  z-index: 51;
  background: #FAF8F4;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 0;
  margin-bottom: 12px;
}

.client-sticky-header .tabs {
  position: static;
  top: auto;
  margin-bottom: 0;
  border-bottom: none;
}

.client-header-avatar {
  display: none;
}

.client-header-name {
  margin: 0;
  color: var(--charcoal);
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  cursor: pointer;
}

.client-header-name:hover {
  color: var(--sage);
}

.client-header-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.client-header-meta { color: var(--text-muted); }
.client-header-sep { color: var(--border-strong); }

.client-header-edit {
  color: var(--text-muted);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.client-header-edit:hover { color: var(--sage); text-decoration: underline; }

.client-header-sub .crisis-alert-btn {
  font-size: 0.75rem;
  padding: 2px 8px;
  min-height: auto;
}

@media (max-width: 767px) {
  .client-sticky-header { top: 52px; }
  .client-sticky-header > div:first-child {
    flex-wrap: wrap !important;
    gap: 2px 16px !important;
  }
  .client-sticky-header > div:first-child > div:first-child {
    flex: 1 0 100% !important;
  }
  }
  .client-header-name { font-size: 1rem; }
  .client-header-avatar { width: 30px; height: 30px; font-size: 0.6875rem; }
  .client-header-sub {
    font-size: 0.6875rem;
    flex-shrink: 1 !important;
    justify-content: flex-start !important;
  }
  .layout.client-page,
  .layout.client-page.sidebar-open { grid-template-columns: 1fr; }
  .layout.client-page.sidebar-open .sidebar { display: block; position: fixed; }
  .layout.client-page .sidebar.open { display: block; }
}

/* Card clusters for Session Prep */
.card-cluster { display: flex; flex-direction: column; gap: 12px; }
.card-cluster + .card-cluster { margin-top: 12px; }

/* Progressive homework disclosure */
.hw-form-expanded { display: none !important; }
.hw-form-expanded.show { display: block !important; }
.hw-expand-btn {
  background: none;
  border: none;
  color: var(--sage);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0;
}
.hw-expand-btn:hover { text-decoration: underline; }

/* Empty card collapse */
.card.is-empty { border: 1px dashed var(--border-subtle); box-shadow: none; }
.card.is-empty .card-body { padding: 10px 24px; }
.card.is-empty .card-header { border-bottom: none; padding-bottom: 0; }

/* Onboarding hero card */
.card.is-onboarding .card-body { text-align: center; padding: 32px 24px; color: var(--text-muted); }

/* Unified attention card on Home */
.attention-feed .feed-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; border-radius: 8px; cursor: pointer; transition: background 0.15s;
}
.attention-feed .feed-item:hover { background: var(--bg); }
.attention-feed .feed-item + .feed-item { border-top: 1px solid var(--border-subtle); }
.feed-item-indicator { width: 3px; height: 28px; border-radius: 2px; flex-shrink: 0; }
.feed-item-indicator.crisis { background: var(--danger); }
.feed-item-indicator.message { background: var(--info); }

/* Calendar strip month divider — labels are inline DOM elements now */

/* === EMERGENCY CONTACT WARNING BANNER === */
.emergency-warning-banner {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid #C85A3A;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 12px 16px;
  margin-bottom: 14px;
}

.emergency-warning-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.emergency-warning-icon {
  font-size: 0.9375rem;
  flex-shrink: 0;
  line-height: 1;
}

.emergency-warning-text {
  flex: 1;
  font-size: 0.8125rem;
  color: var(--text-light);
  line-height: 1.4;
}

.emergency-warning-text a {
  color: #B04A2D;
  font-weight: 600;
  text-decoration: underline;
}

.emergency-warning-close {
  background: none;
  border: none;
  font-size: 1.125rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  min-height: 32px;
  min-width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
