/* ==========================================================================
   Jathagam Experience — Dashboard  (mobile-first)
   ========================================================================== */

/* ── Layout (match daily-ai-report wrapper pattern) ── */
.jathagam-dash-wrapper {
  background: linear-gradient(135deg, #fdf6ff 0%, #f3eaff 100%);
  border-radius: 16px;
  max-width: var(--page-max);
  margin: 0 auto;
}
.jathagam-dash {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 12px 12px 40px;
}

/* ── Breadcrumb (matches daily-ai-report pattern) ── */
.jathagam-dash .breadcrumb-nav.micro,
.jathagam-dash-wrapper .breadcrumb-nav.micro {
  font-size: 0.78rem;
  color: #6b5c7b;
  margin: 0 0 10px;
  padding: 0;
}
.jathagam-dash .breadcrumb-nav.micro a {
  color: #7b2cbf;
  text-decoration: none;
}
.jathagam-dash .breadcrumb-nav.micro a:hover {
  text-decoration: underline;
}
.jathagam-dash .breadcrumb-nav.micro .sep {
  margin: 0 4px;
  color: #b0a0c0;
}

/* ── Card wrapper ── */
.dash-card {
  background: #fff;
  border: 1px solid #e8e0f0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

/* ── Titles ── */
.dash-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #7b2cbf;
  margin: 0 0 4px;
}

.dash-section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #5a189a;
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid #f3eaff;
}

/* kept for backward compatibility */
.jathagam-exp-placeholder {
  font-size: 1rem;
  color: #555;
}

/* ── Section 1 — Birth Summary ── */
.dash-birth-meta {
  margin: 10px 0 14px;
}
.meta-row {
  display: flex;
  gap: 8px;
  padding: 3px 0;
  font-size: 0.92rem;
}
.meta-label {
  color: #888;
  min-width: 100px;
}
.meta-value {
  color: #333;
  font-weight: 500;
}
.meta-weekday {
  color: #7b2cbf;
  font-weight: 400;
  font-size: 0.88rem;
}

.dash-astro-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.astro-chip {
  background: linear-gradient(135deg, #f3eaff 0%, #e8d5ff 100%);
  border-radius: 8px;
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chip-label {
  font-size: 0.72rem;
  color: #7b2cbf;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.chip-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #3c096c;
}

/* ── Section 2 — Running Dasha ── */
.dasha-current-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.dasha-item {
  flex: 1 1 200px;
  background: #fefaff;
  border: 1px solid #e8d5ff;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dasha-level {
  font-size: 0.75rem;
  color: #7b2cbf;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.dasha-graha {
  font-size: 1.1rem;
  font-weight: 700;
  color: #3c096c;
}
.dasha-remaining {
  font-size: 0.82rem;
  color: #666;
}

/* ── Sections 3 & 4 — Chart Grid (South Indian) ── */
.chart-grid.south-indian {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  max-width: 400px;
  margin: 0 auto;
  border: 3px solid #7b2cbf;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(123, 44, 191, 0.12);
  position: relative;
}
/* Decorative outer glow */
.chart-grid.south-indian::before {
  content: '';
  position: absolute;
  inset: -6px;
  border: 2px solid #c77dff;
  border-radius: 14px;
  pointer-events: none;
}
.chart-cell {
  background: #fefaff;
  min-height: 72px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid #d8b4fe;
}
/* Lagna cell — subtle highlight */
.chart-cell.chart-lagna {
  background: #f3eaff;
}
/* Lagna mark: home icon at top-left corner */
.lagna-mark {
  position: absolute;
  top: 2px;
  left: 3px;
  font-size: 0.65rem;
  line-height: 1;
  pointer-events: none;
  z-index: 2;
}
.lagna-mark::before {
  content: '\1F3E0';
}
/* Merged center cell — spans 2 cols × 2 rows */
.chart-cell.chart-center-merged {
  grid-column: span 2;
  grid-row: span 2;
  background: #faf5ff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d8b4fe;
}
.center-label {
  font-size: 0.85rem;
  color: #7b2cbf;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.cell-house-no {
  position: absolute;
  top: 2px;
  left: 4px;
  font-size: 0.6rem;
  color: #bbb;
}
/* Shift house number right when lagna-mark is present */
.chart-lagna .cell-house-no {
  left: 18px;
}
.cell-planets {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 14px;
  justify-content: center;
}
.planet-tag {
  font-size: 0.72rem;
  color: #5a189a;
  font-weight: 600;
  background: #f3eaff;
  border-radius: 3px;
  padding: 1px 4px;
  white-space: nowrap;
}

/* ── Section 5 — Graha Details Table ── */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.graha-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 520px;
}
.graha-table th,
.graha-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
}
.graha-table th {
  background: #f3eaff;
  color: #5a189a;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  position: sticky;
  top: 0;
}
.graha-table tbody tr:hover {
  background: #faf5ff;
}
.retro-row td:first-child::after {
  content: ' ↺';
  color: #c77dff;
  font-size: 0.7rem;
}

/* ── Section 6 — Panchangam ── */
.panchangam-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.panchangam-item {
  flex: 1 1 140px;
  background: #fefaff;
  border: 1px solid #e8d5ff;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.panchangam-label {
  font-size: 0.72rem;
  color: #7b2cbf;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.panchangam-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: #3c096c;
}

/* ── Section 7 — Dasha Timeline ── */
.dasha-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 440px;
}
.dasha-table th,
.dasha-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
}
.dasha-table th {
  background: #f3eaff;
  color: #5a189a;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  position: sticky;
  top: 0;
}
.dasha-current-row {
  background: #f3eaff;
  font-weight: 600;
}
.dasha-elapsed-row {
  background: #fef8ee;
  font-style: italic;
  color: #7a6a50;
}
.elapsed-label {
  display: block;
  font-size: 0.75rem;
  color: #9a8260;
  font-weight: 400;
}
.dasha-cycle-footer {
  text-align: center;
  font-size: 0.8rem;
  color: #888;
  margin-top: 8px;
  padding: 4px 0;
}
.dasha-table tbody tr:hover {
  background: #faf5ff;
}

/* ── Section 8 — Bhukti Table ── */
.bhukti-table {
  min-width: 380px;
}
.bhukti-table td:nth-child(3),
.bhukti-table td:nth-child(4) {
  font-variant-numeric: tabular-nums;
}

/* ── Welcome card fallback ── */
.jathagam-exp-welcome-card {
  text-align: center;
  padding: 40px 16px;
}
.jathagam-exp-welcome-msg {
  color: #666;
  font-size: 0.95rem;
}

/* ── Guidance Layer (Prompt 5.5.5) ── */
.dash-guidance-layer {
  border-left: 3px solid #7b2cbf;
}
.guidance-block {
  margin-bottom: 16px;
}
.guidance-block:last-child {
  margin-bottom: 0;
}
.guidance-block-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: #5a189a;
  margin: 0 0 8px;
}
.guidance-text {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #333;
  margin: 0;
}

/* Theme cards grid */
.guidance-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.guidance-theme-card {
  background: #fefaff;
  border: 1px solid #e8d5ff;
  border-radius: 10px;
  padding: 14px;
}
.guidance-card-type {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #7b2cbf;
  background: #f3eaff;
  border-radius: 4px;
  padding: 2px 8px;
  margin-bottom: 6px;
}
.guidance-card-title {
  font-size: 0.98rem;
  font-weight: 600;
  color: #3c096c;
  margin: 0 0 6px;
}
.guidance-card-body {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #444;
  margin: 0 0 6px;
}

/* Per-card "why" collapsible */
.guidance-card-why {
  margin-top: 6px;
}
.guidance-card-why summary {
  font-size: 0.78rem;
  color: #7b2cbf;
  cursor: pointer;
  font-weight: 500;
}
.guidance-card-why summary:hover {
  text-decoration: underline;
}
.guidance-reason-list {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 0.82rem;
  color: #555;
  line-height: 1.5;
}

/* Suggestions */
.guidance-suggestion-list {
  margin: 0;
  padding-left: 20px;
  font-size: 0.88rem;
  color: #444;
  line-height: 1.6;
}
.guidance-suggestion-list li {
  margin-bottom: 6px;
}

/* Why section (overall) */
.guidance-why-section {
  border-top: 1px solid #e8d5ff;
  padding-top: 12px;
}
.guidance-why-toggle {
  font-size: 0.85rem;
  cursor: pointer;
  color: #7b2cbf;
  list-style: revert;
}
.guidance-why-toggle:hover {
  text-decoration: underline;
}
.guidance-why-content {
  margin-top: 8px;
}
.guidance-meta {
  font-size: 0.78rem;
  color: #888;
  margin: 2px 0;
}

/* ─────────────────────────────────────────────────────────────────
   Tablet and up
   ───────────────────────────────────────────────────────────────── */
/* ─────────────────────────────────────────────────────────────────
   Mobile (≤ 480px) — compact table adjustments
   ───────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .dasha-table th,
  .dasha-table td,
  .graha-table th,
  .graha-table td {
    padding: 6px 6px;
    font-size: 0.78rem;
  }
  .dasha-table th,
  .graha-table th {
    font-size: 0.7rem;
  }
  .bhukti-table {
    min-width: 340px;
  }
  .dasha-table {
    min-width: 400px;
  }
  .table-scroll {
    margin: 0 -8px;
    padding: 0 8px;
  }
}

/* ─────────────────────────────────────────────────────────────────
   Tablet and up
   ───────────────────────────────────────────────────────────────── */
@media (min-width: 768px) {
  .jathagam-dash {
    padding: 24px 16px 48px;
  }
  .dash-card {
    padding: 24px;
    margin-bottom: 20px;
  }
  .dash-title {
    font-size: 1.85rem;
  }
  .dash-section-title {
    font-size: 1.25rem;
  }
  .chart-grid.south-indian {
    max-width: 460px;
  }
  .chart-cell {
    min-height: 80px;
    padding: 6px;
  }
  .lagna-mark {
    font-size: 0.75rem;
  }
  .planet-tag {
    font-size: 0.8rem;
  }
  .graha-table {
    font-size: 0.9rem;
  }
  .dasha-table {
    font-size: 0.9rem;
  }
  /* Guidance — 2-column cards on tablet+ */
  .guidance-cards-grid {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .guidance-theme-card {
    flex: 1 1 calc(50% - 6px);
    max-width: calc(50% - 6px);
  }
}

/* ── Empty State (BUG-015) ── */
.jathagam-exp-empty-state {
  text-align: center;
  padding: 48px 16px 40px;
}
.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}
.empty-state-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #7b2cbf;
  margin: 0 0 10px;
}
.empty-state-desc {
  font-size: 0.92rem;
  color: #666;
  line-height: 1.5;
  margin: 0 0 20px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}
.jathagam-exp-btn-cta {
  display: inline-block;
  background: linear-gradient(90deg, #7b2cbf, #c792e9);
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.7rem 2rem;
  border-radius: 10px;
  border: none;
  text-decoration: none;
  transition: opacity 0.2s;
}
.jathagam-exp-btn-cta:hover {
  opacity: 0.9;
  color: #fff;
  text-decoration: none;
}

/* ── Prompt 105: Chart access denied — unauthorized/unavailable ── */
.chart-access-denied {
  text-align: center;
  padding: 48px 20px 40px;
  background: #fefcff;
  border: 1px solid #e8d8f4;
  border-radius: 14px;
  margin: 16px 0;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.chart-access-denied-icon {
  font-size: 2.5rem;
  margin-bottom: 14px;
}
.chart-access-denied-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #5a189a;
  margin: 0 0 10px;
}
.chart-access-denied-msg {
  font-size: 0.9rem;
  color: #6b5c80;
  line-height: 1.65;
  margin: 0 0 24px;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}
.chart-access-denied-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  max-width: 240px;
  margin-left: auto;
  margin-right: auto;
}
.chart-access-denied-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: box-shadow 0.2s, opacity 0.2s;
  justify-content: center;
}
.chart-access-denied-btn--primary {
  background: linear-gradient(135deg, #7b2cbf, #a855f7);
  color: #fff;
}
.chart-access-denied-btn--primary:hover {
  box-shadow: 0 4px 16px rgba(123, 44, 191, 0.3);
  color: #fff;
  text-decoration: none;
}
.chart-access-denied-btn--secondary {
  background: #f3ecfb;
  color: #7b2cbf;
  border: 1px solid #d8c4f0;
}
.chart-access-denied-btn--secondary:hover {
  background: #ebe0f6;
  text-decoration: none;
  color: #7b2cbf;
}

/* ── Floating FAB Group (Prompt 18 + Prompt 54D.3) ── */
.dash-fab-group {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.dash-ai-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #7b2cbf, #a855f7);
  color: #fff;
  border: none;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(123, 44, 191, 0.35), 0 2px 6px rgba(0,0,0,0.1);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s;
}
.dash-ai-fab:hover {
  box-shadow: 0 6px 24px rgba(123, 44, 191, 0.45), 0 3px 8px rgba(0,0,0,0.12);
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
}
.dash-my-charts-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: #fff;
  color: #7b2cbf;
  border: 1.5px solid #d8b4fe;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(123, 44, 191, 0.15), 0 1px 4px rgba(0,0,0,0.06);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.15s, background 0.2s;
}
.dash-my-charts-fab:hover {
  background: #faf5ff;
  box-shadow: 0 4px 16px rgba(123, 44, 191, 0.25), 0 2px 6px rgba(0,0,0,0.08);
  transform: translateY(-1px);
  text-decoration: none;
  color: #7b2cbf;
}
.dash-ai-fab-icon {
  font-size: 1.1rem;
  line-height: 1;
}
.dash-ai-fab-label {
  white-space: nowrap;
}

/* Mobile: icon only below 420px */
@media (max-width: 420px) {
  .dash-fab-group {
    bottom: 16px;
    right: 16px;
    gap: 10px;
  }
  .dash-ai-fab {
    padding: 14px;
    border-radius: 50%;
  }
  .dash-my-charts-fab {
    padding: 12px;
    border-radius: 50%;
  }
  .dash-ai-fab-label {
    display: none;
  }
  .dash-ai-fab-icon {
    font-size: 1.3rem;
  }
}

/* Delete Chart Section removed — Prompt 54D.2 (delete only via My Charts 3-dot menu) */
