/* Screen-specific layout */

/* --- Home dashboard --------------------------------------------------- */
.hero-card {
  background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 70%, var(--gold)) 130%);
  color: var(--accent-text);
  border-radius: var(--radius);
  padding: 18px 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.hero-top { display: flex; align-items: center; gap: 12px; }
.hero-top .avatar { background: rgba(255, 255, 255, 0.2); color: inherit; }
.greeting { margin: 0; font-weight: 700; font-size: 1.1em; }
.hero-sub { margin: 3px 0 0; font-size: 0.88em; opacity: 0.9; }

.score-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.score-grid .score-card:last-child:nth-child(odd) { grid-column: 1 / -1; }

.advice-card .advice-text { margin: 0 0 12px; line-height: 1.5; }
.advice-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 0.88em; color: var(--muted); }
.advice-meta strong { color: var(--text); }

/* --- Birth chart (Kundali) --------------------------------------------- */
.hero { padding: 4px 4px 18px; }
.hero h1 { margin: 0 0 6px; font-size: 1.4em; }
.hero .tagline { color: var(--muted); margin: 0; line-height: 1.4; }

#chart-result { margin-top: 8px; }

.ascendant-summary {
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.95em;
}
.ascendant-summary strong { color: var(--accent); }
.ascendant-summary p { margin: 0 0 4px; }
.ascendant-summary p:last-child { margin-bottom: 0; }
.ascendant-summary .hint { display: inline; }

/* North Indian chart diagram */
.kundali-chart-wrap {
  max-width: 280px;
  margin: 0 auto 16px;
}
.kundali-chart-svg { width: 100%; height: auto; display: block; }
.chart-house { fill: var(--bg); stroke: var(--border); stroke-width: 1.5; }
.chart-house-num { font-size: 9px; fill: var(--muted); text-anchor: middle; }
.chart-asc-label { font-size: 9px; font-weight: 700; fill: var(--gold); text-anchor: middle; }
.chart-planets { font-size: 10px; font-weight: 700; fill: var(--accent); text-anchor: middle; }

.planet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}
.planet-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  background: var(--bg);
}
.planet-card .planet-name { font-weight: 700; font-size: 0.95em; display: flex; align-items: center; gap: 6px; }
.planet-card .retro-badge {
  font-size: 0.7em;
  color: var(--accent-text);
  background: var(--gold);
  border-radius: 5px;
  padding: 1px 5px;
  font-weight: 700;
}
.planet-card .planet-meta { color: var(--muted); font-size: 0.85em; margin-top: 3px; line-height: 1.4; }

.interp-grid { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.interp-grid .card { background: var(--surface-2); margin-bottom: 0; padding: 14px 16px; box-shadow: none; }
.interp-grid .card h3 {
  margin: 0 0 6px;
  font-size: 0.9em;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.interp-grid .card p { margin: 0; line-height: 1.55; }

#interp-btn { margin-top: 4px; }

/* --- Settings ----------------------------------------------------------- */
.segmented-3 .segmented-label { padding: 10px 6px; font-size: 0.88em; }

/* --- Forecast (Rashifal) -------------------------------------------------
   Same pattern as dPatro's Rashi Fal panel: a 12-sign tap grid, then the
   selected sign's prediction in a detail card below it. Grid stays put so
   switching signs doesn't reflow the page. */
.forecast-header { padding: 4px 4px 16px; }
.forecast-header h1 { margin: 0 0 6px; font-size: 1.4em; }
.forecast-header .hint { margin: 0 0 10px; }

.rashi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.rashi-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
}
.rashi-cell.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.rashi-cell-ico { font-size: 20px; line-height: 1; }
.rashi-cell-txt { font-size: 0.72em; font-weight: 600; text-align: center; color: var(--text); }

.rashi-detail-card .card-title { margin-bottom: 12px; }
.rashi-detail-row { margin-bottom: 12px; }
.rashi-detail-row:last-child { margin-bottom: 0; }
.rashi-detail-label {
  font-size: 0.72em;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}
.rashi-detail-text { font-size: 0.92em; line-height: 1.5; margin: 0; }

/* --- Daily Prediction / Weekly Report ----------------------------------- */
.report-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0 14px;
}
.report-header h1 { margin: 0; font-size: 1.2em; flex: 1; }
.report-back-btn {
  border: none;
  background: var(--surface-2);
  color: var(--text);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}
.report-back-btn .icon svg { width: 18px; height: 18px; }
.beta-badge {
  display: inline-block;
  font-size: 0.68em;
  font-weight: 700;
  color: var(--gold);
  background: var(--gold-soft);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}
.report-meta { padding: 0 2px 14px; }
.report-date-line { font-weight: 600; font-size: 0.95em; }
.report-person-line { color: var(--muted); font-size: 0.88em; margin-top: 2px; }

.level-pill {
  display: inline-block;
  font-size: 0.72em;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
}
.level-pill.level-favorable { color: var(--level-favorable); background: var(--level-favorable-soft); }
.level-pill.level-neutral   { color: var(--level-neutral);   background: var(--level-neutral-soft); }
.level-pill.level-avoid     { color: var(--level-avoid);     background: var(--level-avoid-soft); }

.headline-card { border-left: 4px solid var(--border); }
.headline-card.level-favorable { border-left-color: var(--level-favorable); }
.headline-card.level-neutral   { border-left-color: var(--level-neutral); }
.headline-card.level-avoid     { border-left-color: var(--level-avoid); }
.headline-title { font-weight: 700; margin: 10px 0 4px; line-height: 1.4; }
.headline-text { margin: 0; color: var(--muted); line-height: 1.5; font-size: 0.94em; }

/* "At a glance" strip — every activity's (or, on the week strip, every
   day's) verdict in one scan before the detail below, same idea as
   dPatro's report-view.js .pr-glance. */
.report-glance {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 6px;
  margin-bottom: 16px;
}
.report-glance-item {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--surface);
  font-size: 0.82em;
  font-weight: 600;
}
.glance-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: inline-block;
}
.glance-dot.level-favorable { background: var(--level-favorable); }
.glance-dot.level-neutral   { background: var(--level-neutral); }
.glance-dot.level-avoid     { background: var(--level-avoid); }
.report-glance-item .glance-level { margin-left: auto; font-weight: 700; font-size: 0.9em; color: var(--muted); }

.report-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.report-chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.8em;
  background: var(--surface-2);
}
.report-chip b { font-weight: 700; }

.dasha-line { margin: 0 0 6px; font-size: 0.95em; }

/* Side-by-side pair — Do/Avoid, best/toughest day. */
.report-two {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.report-two .card { margin-bottom: 0; }

.report-disclaimer { padding: 4px 2px 0; }

.report-kv-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 12px;
}
.report-kv-label { font-size: 0.72em; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 2px; }
.report-kv-value { font-size: 0.95em; font-weight: 600; }

.panchang-bala-row { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.panchang-bala-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.88em;
  line-height: 1.4;
}
.panchang-bala-line .level-pill { flex: 0 0 auto; }
.panchang-bala-line strong { color: var(--text); }
.panchang-bala-line span { color: var(--muted); }

.activity-list { display: flex; flex-direction: column; gap: 12px; }
.activity-row {
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  background: var(--surface-2);
  border-left: 3px solid var(--border);
}
.activity-row.level-favorable { border-left-color: var(--level-favorable); }
.activity-row.level-neutral   { border-left-color: var(--level-neutral); }
.activity-row.level-avoid     { border-left-color: var(--level-avoid); }
.activity-row-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.activity-title { font-weight: 700; }
.activity-time { margin: 6px 0 0; font-size: 0.82em; color: var(--muted); font-weight: 600; }
.activity-line { margin: 6px 0 0; font-size: 0.88em; line-height: 1.4; }
.activity-line.pos { color: var(--level-favorable); }
.activity-line.cau { color: var(--muted); }

.window-group { margin-bottom: 12px; }
.window-group:last-child { margin-bottom: 0; }
.window-group-label {
  font-size: 0.72em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 4px;
}
.window-group-label.good  { color: var(--level-favorable); }
.window-group-label.avoid { color: var(--level-avoid); }
.window-group-label.caution { color: var(--level-neutral); }
.window-line { margin: 0 0 3px; font-size: 0.9em; }

.report-method { text-align: center; padding: 4px 8px 0; }

/* Weekly Report's centerpiece — a 7-cell strip, the week's own "at a
   glance" (see .report-glance above for the Daily Report's version). */
.week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}
.week-strip-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border-radius: var(--radius-sm);
  padding: 10px 2px 8px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.week-strip-cell.level-favorable { background: var(--level-favorable-soft); border-color: transparent; }
.week-strip-cell.level-neutral   { background: var(--level-neutral-soft);   border-color: transparent; }
.week-strip-cell.level-avoid     { background: var(--level-avoid-soft);     border-color: transparent; }
.week-strip-day { font-size: 0.68em; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.week-strip-date { font-size: 0.92em; font-weight: 700; }

/* Shared Share/Print/Email action bar (js/screens/reportActions.js) —
   sticky since these screens have no bottom nav to compete with. */
.report-actions-bar {
  position: sticky;
  bottom: 0;
  margin: 16px -16px -16px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: var(--bg);
  border-top: 1px solid var(--border);
}
.report-actions-status { font-size: 0.82em; color: var(--muted); min-height: 16px; margin-bottom: 4px; }
.report-actions-row { display: flex; gap: 8px; }
.report-action-btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 6px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 0.85em;
  font-weight: 700;
  cursor: pointer;
}
.report-action-btn:active { background: var(--accent-soft); }

@media print {
  .bottom-nav, .topbar, .report-header, .report-actions-bar, .app-disclaimer { display: none !important; }
}
