/* Dashboard (today-first) styles — direction A from the design canvas.
   Lives alongside mood-sunrise.css. Reference from site.css or import in _Host. */

.sunrise-dash {
  background: #FDF6F0;
  color: #5C3A2E;
  position: relative;
  min-height: 100vh;
  font-family: 'Inter', -apple-system, sans-serif;
  overflow: hidden;
}
.sunrise-dash-blob {
  position: absolute; top: -200px; right: -150px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, #FFD4B8 0%, #FFE8D6 40%, transparent 70%);
  border-radius: 50%; filter: blur(40px); pointer-events: none; z-index: 0;
}
.sunrise-dash-inner {
  position: relative; z-index: 1;
  padding: 32px 40px;
  max-width: 1200px; margin: 0 auto;
}

/* ── Low-day soft-touch banner ── */
.sunrise-lowday {
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(255,232,214,0.7), rgba(255,245,235,0.85));
  border: 1px solid rgba(224,141,111,0.25);
  border-radius: 20px;
  padding: 24px;
  display: flex; gap: 18px; align-items: flex-start;
}
.sunrise-lowday-icon { flex-shrink: 0; margin-top: 2px; }
.sunrise-lowday-body { flex: 1; }
.sunrise-lowday-title {
  font-family: 'Fraunces', 'Lora', serif;
  font-size: 19px; font-weight: 500;
  color: #3D2419; letter-spacing: -0.01em;
  margin-bottom: 6px; line-height: 1.35;
}
.sunrise-lowday-copy { font-size: 13px; color: #5C3A2E; line-height: 1.65; margin-bottom: 14px; }
.sunrise-lowday-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.sunrise-pill {
  font-size: 12px; font-weight: 600;
  padding: 8px 14px; border-radius: 999px;
  cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center;
  transition: all 0.15s ease;
}
.sunrise-pill-solid { background: white; color: #3D2419; border: 1px solid rgba(224,141,111,0.18); }
.sunrise-pill-ghost { background: transparent; color: #5C3A2E; border: 1px solid rgba(224,141,111,0.18); }
.sunrise-pill-link  { background: transparent; color: #8C5E4D; border: none; text-decoration: underline; text-decoration-color: rgba(140,94,77,0.3); text-underline-offset: 3px; }
.sunrise-pill:hover { transform: translateY(-1px); }

/* ── Hero card ── */
.sunrise-hero {
  background: white;
  border-radius: 24px;
  padding: 32px;
  box-shadow: 0 20px 50px rgba(224,141,111,0.18), 0 4px 12px rgba(92,58,46,0.05);
  border: 1px solid rgba(224,141,111,0.18);
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center;
}
.sunrise-hero-date {
  font-size: 12px; font-weight: 600; color: #8C5E4D;
  text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px;
}
.sunrise-hero-greeting {
  font-family: 'Fraunces', 'Lora', serif;
  font-size: 40px; font-weight: 500;
  color: #3D2419; letter-spacing: -0.025em;
  margin: 0 0 6px; line-height: 1.1;
}
.sunrise-hero-prompt { font-size: 15px; color: #5C3A2E; line-height: 1.55; margin-bottom: 22px; }
.sunrise-hero-prompt em { font-style: italic; color: #3D2419; font-weight: 500; }

.sunrise-hero-cta-row { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; }
.sunrise-cta-primary {
  background: linear-gradient(135deg, #E08D6F 0%, #F4A261 100%);
  color: white; border: none;
  padding: 12px 22px; border-radius: 999px;
  font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
  box-shadow: 0 8px 24px rgba(224,141,111,0.25);
  display: inline-flex; align-items: center;
}
.sunrise-cta-ghost {
  background: white; color: #5C3A2E;
  border: 1px solid rgba(224,141,111,0.18);
  padding: 12px 20px; border-radius: 999px;
  font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center;
}

.sunrise-hero-stats {
  display: flex; gap: 28px;
  padding-top: 20px; border-top: 1px solid rgba(92,58,46,0.08);
}
.sunrise-stat-value {
  font-family: 'Fraunces', 'Lora', serif;
  font-size: 28px; font-weight: 500;
  color: #3D2419; letter-spacing: -0.02em;
}
.sunrise-stat-trend-up    { color: #3D6A4F; }
.sunrise-stat-trend-down  { color: #8E3A3A; }
.sunrise-stat-trend-flat  { color: #8C5E4D; }
.sunrise-stat-label {
  font-size: 11px; color: #8C5E4D; font-weight: 500;
  letter-spacing: 0.05em; text-transform: uppercase;
}

/* ── Week strip on hero right ── */
.sunrise-week-eyebrow {
  font-size: 11px; font-weight: 700; color: #A87A65;
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 14px;
}
.sunrise-week-strip { display: flex; justify-content: space-between; gap: 6px; }
.sunrise-week-day { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sunrise-week-label { font-size: 10px; font-weight: 600; color: #A87A65; }
.sunrise-week-day.is-today .sunrise-week-label { color: #3D2419; }
.sunrise-week-icon-wrap { border-radius: 50%; padding: 0; }
.sunrise-week-icon-wrap.is-today {
  padding: 3px;
  background: linear-gradient(135deg, #E08D6F 0%, #F4A261 100%);
}
.sunrise-week-empty-dot {
  width: 38px; height: 38px; border-radius: 50%;
  background: #F5E8DA; border: 1px dashed rgba(168, 122, 101, 0.4);
}
.sunrise-week-value { font-size: 10px; font-weight: 600; color: #8C5E4D; }
.sunrise-week-day.is-today .sunrise-week-value { color: #3D2419; }
.sunrise-week-insight {
  margin-top: 16px; font-size: 12px; color: #8C5E4D;
  line-height: 1.5; font-style: italic;
}

/* ── Generic dashboard card ── */
.sunrise-card {
  background: white;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 14px rgba(92,58,46,0.06), 0 1px 3px rgba(92,58,46,0.04);
  border: 1px solid rgba(224,141,111,0.18);
}
.sunrise-card-header {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 16px; margin-bottom: 14px;
}
.sunrise-card-title {
  font-family: 'Fraunces', 'Lora', serif;
  font-size: 22px; font-weight: 500;
  color: #3D2419; letter-spacing: -0.02em; margin: 0;
}
.sunrise-card-link { font-size: 12px; font-weight: 600; color: #A56D58; cursor: pointer; text-decoration: none; }
.sunrise-card-meta { font-size: 11px; color: #8C5E4D; }
.sunrise-card-sub  { font-size: 12px; color: #8C5E4D; margin-bottom: 12px; }
.sunrise-card-footer { text-align: center; margin-top: 14px; }

.sunrise-eyebrow {
  font-size: 11px; font-weight: 700; color: #A87A65;
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 6px;
}
.sunrise-pill-static {
  font-size: 11px; padding: 5px 11px; border-radius: 999px;
  background: #FFEFE2; color: #5C3A2E; font-weight: 600;
}

/* ── Two-column row ── */
.sunrise-row { margin-top: 24px; }
.sunrise-row-2up { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; }

/* ── Dimension grid (today's check-in) ── */
.sunrise-dim-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.sunrise-dim-tile {
  text-align: center; padding: 12px 6px;
  background: #FFFAF4; border-radius: 14px;
  border: 1px solid rgba(224,141,111,0.08);
}
.sunrise-dim-icon { margin: 0 auto 8px; width: 38px; height: 38px; }
.sunrise-dim-name { font-size: 11px; font-weight: 600; color: #8C5E4D; margin-bottom: 2px; }
.sunrise-dim-mood { font-size: 13px; font-weight: 600; color: #3D2419; }
.sunrise-dim-num  { font-size: 10px; color: #A87A65; margin-top: 1px; }

/* ── Trend line ── */
.sunrise-trend-wrap { padding-top: 4px; }
.sunrise-trend-svg  { width: 100%; height: auto; display: block; }

/* ── Correlations table ── */
.sunrise-card-correlations { margin-top: 24px; }
.sunrise-corr-table-head {
  display: grid; grid-template-columns: 1fr 110px 140px;
  gap: 16px;
  font-size: 10px; font-weight: 700; color: #A87A65;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding-bottom: 10px; border-bottom: 1px solid rgba(92,58,46,0.08);
}
.sunrise-text-right { text-align: right; }
.sunrise-corr-row {
  display: grid; grid-template-columns: 1fr 110px 140px;
  gap: 16px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid rgba(92,58,46,0.08);
}
.sunrise-corr-row:last-child { border-bottom: none; }

.sunrise-corr-name-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.sunrise-corr-name { font-size: 14px; font-weight: 600; color: #3D2419; }
.sunrise-corr-meta { font-size: 12px; color: #8C5E4D; }

.sunrise-kind-pill {
  font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 999px;
}
.sunrise-kind-medication { background: #FFE0F0; color: #8E3A6E; }
.sunrise-kind-movement   { background: #E0F4E8; color: #3D6A4F; }
.sunrise-kind-supplement { background: #FFF0D8; color: #8E5F1F; }
.sunrise-kind-habit      { background: #F0E8FF; color: #5A3A8E; }

.sunrise-corr-mean {
  font-family: 'Fraunces', 'Lora', serif;
  font-size: 24px; font-weight: 500;
  color: #3D2419; letter-spacing: -0.02em;
}
.sunrise-corr-mean.is-positive { color: #3D6A4F; }
.sunrise-corr-mean.is-negative { color: #8E3A3A; }
.sunrise-corr-ci-text { font-size: 10px; color: #A87A65; margin-top: 2px; }

.sunrise-needs-more { font-size: 11px; color: #A87A65; font-style: italic; }

/* ── CI bar ── */
.sunrise-ci-bar { position: relative; height: 20px; }
.sunrise-ci-zero { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; background: rgba(92,58,46,0.2); }
.sunrise-ci-band { position: absolute; top: 7px; height: 6px; opacity: 0.25; border-radius: 999px; }
.sunrise-ci-mean { position: absolute; top: 3px; height: 14px; width: 3px; border-radius: 2px; }
.sunrise-ci-axis {
  position: absolute; bottom: -14px; left: 0; right: 0;
  display: flex; justify-content: space-between;
  font-size: 8px; color: #A87A65; font-weight: 600;
}
.sunrise-ci-empty {
  height: 6px; background: #F5E8DA; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; color: #A87A65; font-weight: 600; letter-spacing: 0.1em;
}

/* ── Crisis footer ── */
.sunrise-footer {
  padding: 32px 40px;
  border-top: 1px solid rgba(92,58,46,0.08);
  background: rgba(255,245,235,0.5);
  font-size: 12px; color: #8C5E4D; line-height: 1.6;
}
.sunrise-footer-inner {
  max-width: 900px; margin: 0 auto;
  display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.sunrise-footer-crisis { flex: 1 1 360px; }
.sunrise-footer-resources { display: flex; gap: 20px; flex-wrap: wrap; }
.sunrise-footer-resources strong { font-weight: 600; color: #5C3A2E; }
.sunrise-footer-meta { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.sunrise-footer-meta a { color: #8C5E4D; text-decoration: none; }
.sunrise-footer-meta a:hover { color: #5C3A2E; text-decoration: underline; }
.sunrise-footer-sep { opacity: 0.4; }

/* ── Responsive ── */

/* Tablet / narrow desktop */
@media (max-width: 900px) {
  .sunrise-hero { grid-template-columns: 1fr; }
  .sunrise-row-2up { grid-template-columns: 1fr; }
  .sunrise-dim-grid { grid-template-columns: repeat(3, 1fr); }
  .sunrise-corr-table-head,
  .sunrise-corr-row { grid-template-columns: 1fr 90px; }
  .sunrise-corr-row > div:last-child { grid-column: 1 / -1; }
}

/* Mobile — matches app-shell sidebar hide at 768px */
@media (max-width: 768px) {
  .sunrise-dash-inner { padding: 24px 16px; }
  .sunrise-hero { padding: 24px 20px; gap: 20px; }
  .sunrise-hero-greeting { font-size: 30px; }
  .sunrise-hero-prompt { font-size: 14px; }
  .sunrise-hero-stats { gap: 20px; flex-wrap: wrap; }
  .sunrise-stat-value { font-size: 24px; }
  .sunrise-dim-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .sunrise-card-title { font-size: 20px; }
  .sunrise-footer { padding: 24px 16px; }
  .sunrise-footer-inner { flex-direction: column; gap: 16px; }
  .sunrise-lowday { padding: 18px; gap: 14px; flex-wrap: wrap; }
}

/* Small phones (375px iPhone SE, 412px Pixel 6a) */
@media (max-width: 480px) {
  .sunrise-dash-inner { padding: 16px 12px; }
  .sunrise-hero { padding: 20px 16px; }
  .sunrise-hero-greeting { font-size: 26px; }
  .sunrise-hero-cta-row { flex-direction: column; }
  .sunrise-hero-cta-row > * { width: 100%; text-align: center; justify-content: center; }
  .sunrise-hero-stats { gap: 14px; }
  .sunrise-stat-value { font-size: 20px; }
  .sunrise-stat-label { font-size: 10px; }
  .sunrise-week-strip { gap: 2px; }
  .sunrise-week-empty-dot { width: 30px; height: 30px; }
  .sunrise-week-icon-wrap svg,
  .sunrise-week-icon-wrap img { width: 30px; height: 30px; }
  .sunrise-dim-grid { gap: 8px; }
  .sunrise-dim-tile { padding: 10px 4px; }
  .sunrise-dim-icon { width: 30px; height: 30px; margin-bottom: 4px; }
  .sunrise-dim-name { font-size: 10px; }
  .sunrise-dim-mood { font-size: 12px; }
  .sunrise-card { padding: 18px 14px; }
  .sunrise-card-title { font-size: 18px; }
  .sunrise-corr-table-head,
  .sunrise-corr-row { grid-template-columns: 1fr 80px; gap: 10px; }
  .sunrise-corr-name { font-size: 13px; }
  .sunrise-corr-mean { font-size: 20px; }
  .sunrise-footer { padding: 20px 12px; }
}
