/* Varshphal (Tajika Annual Horoscope) Dashboard Stylesheet */
.vp-page {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink, #1e293b);
  background: var(--paper, #f4f7fb);
  padding: 16px 20px 32px;
  border-radius: 12px;
  min-height: 100%;
  box-sizing: border-box;
}

/* Hero Header */
.vp-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 8px 4px 18px;
  flex-wrap: wrap;
}

.vp-heading {
  display: flex;
  align-items: center;
  gap: 14px;
}

.vp-hero-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
  border: 1px solid #bfdbfe;
  display: grid;
  place-items: center;
  color: #0284c7;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.12);
}

.vp-heading h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.vp-heading p {
  margin: 4px 0 0;
  font-size: 13px;
  color: #64748b;
}

.vp-badge-pill {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

/* Controls Bar */
.vp-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.vp-controls-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.vp-control-label {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

.vp-age-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.vp-age-select {
  appearance: none;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 7px 32px 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.vp-age-select:hover,
.vp-age-select:focus {
  border-color: #3b82f6;
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.vp-age-select-arrow {
  position: absolute;
  right: 10px;
  pointer-events: none;
  color: #64748b;
  font-size: 10px;
}

.vp-btn-nav {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.vp-btn-nav:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.vp-controls-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.vp-btn-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.vp-btn-download-pdf {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.vp-btn-download-pdf:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}

.vp-btn-export-chart {
  background: #1a73e8;
  border: 1px solid #1557b0;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(26, 115, 232, 0.3);
}

.vp-btn-export-chart:hover {
  background: #1557b0;
}

/* Card Base */
.vp-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03), 0 4px 12px rgba(15, 23, 42, 0.02);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.vp-card:hover {
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  border-color: #cbd5e1;
}

/* Summary Cards Row (Row 1) */
.vp-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.vp-summary-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
}

.vp-summary-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 20px;
}

.vp-icon-period {
  background: #e0f2fe;
  color: #0284c7;
}

.vp-icon-factors {
  background: #f3e8ff;
  color: #9333ea;
}

.vp-icon-lagna {
  background: #fef3c7;
  color: #d97706;
}

.vp-summary-body {
  flex: 1;
  min-width: 0;
}

.vp-summary-title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

.vp-summary-line {
  margin: 2px 0;
  font-size: 12px;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vp-summary-line span.label {
  color: #64748b;
  font-weight: 500;
  margin-right: 4px;
}

.vp-summary-val-bold {
  font-weight: 700;
  color: #0f172a;
}

/* Supporting data uses the same balanced card layout as the dashboard. */
.vp-row-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
  margin-bottom: 18px;
}

/* Card Header */
.vp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.vp-card-title-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
}

.vp-card-icon {
  font-size: 16px;
  color: #0284c7;
  display: flex;
  align-items: center;
}

.vp-card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.vp-btn-icon {
  background: transparent;
  border: 1px solid transparent;
  color: #64748b;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s ease;
}

.vp-btn-icon:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #e2e8f0;
}

.vp-card-subtitle {
  padding: 10px 18px 0;
  margin: 0;
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.45;
}

/* Kundali Chart Container */
.vp-chart-card-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.vp-chart-wrapper {
  width: 100%;
  /* The native dashboard charts use their available card width.  Preserve a
     square chart while allowing the annual Kundali to be comfortably larger. */
  max-width: 560px;
  margin: 0 auto;
}

.vp-chart-wrapper svg.northchart {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  border: 1px solid var(--line, #cbd5e1);
  border-radius: 10px;
  box-shadow: 0 3px 14px rgba(15, 23, 42, 0.06), inset 0 0 0 1px rgba(255, 255, 255, 0.7);
  display: block;
}

.vp-chart-card {
  /* Reuse the Native Dashboard chart-card surface and accent treatment. */
  background: var(--paper, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-top: 3px solid var(--gold, #d97706);
  border-radius: 14px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.04);
}

.vp-chart-card .vp-card-header {
  border-bottom-color: var(--line-subtle, #f1f5f9);
}

.vp-chart-card .vp-card-title,
.vp-chart-card .vp-chart-footer-note {
  color: var(--ink, #0f172a);
}

.vp-chart-footer-note {
  margin-top: 10px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}

/* Tables */
.vp-table-scroll {
  overflow-x: auto;
  padding: 8px 18px 12px;
}

.vp-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  text-align: left;
}

.vp-data-table th {
  padding: 8px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #0284c7;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.vp-data-table td {
  padding: 8px 10px;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.vp-data-table tr:last-child td {
  border-bottom: none;
}

.vp-data-table tr:hover td {
  background: #f8fafc;
}

.vp-row-active td {
  background: #eff6ff !important;
  font-weight: 600;
  color: #1e40af !important;
}

/* Table Planet Glyph Badge */
.vp-planet-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.vp-glyph-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.vp-glyph-sun { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.vp-glyph-moon { background: #e0f2fe; color: #0284c7; border: 1px solid #bae6fd; }
.vp-glyph-mars { background: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
.vp-glyph-mercury { background: #dcfce7; color: #16a34a; border: 1px solid #bbf7d0; }
.vp-glyph-jupiter { background: #ffedd5; color: #ea580c; border: 1px solid #fed7aa; }
.vp-glyph-venus { background: #fce7f3; color: #db2777; border: 1px solid #fbcfe8; }
.vp-glyph-saturn { background: #ede9fe; color: #7c3aed; border: 1px solid #ddd6fe; }
.vp-glyph-rahu { background: #e0e7ff; color: #2563eb; border: 1px solid #c7d2fe; }
.vp-glyph-ketu { background: #f5ebe6; color: #854d0e; border: 1px solid #e7d5c9; }

/* Aspect Nature Badges */
.vp-aspect-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.vp-badge-hostile {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

.vp-badge-challenging {
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid #fdba74;
}

.vp-badge-friendly {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

.vp-badge-supportive {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #6ee7b7;
}

/* Card Footer Link */
.vp-card-footer {
  padding: 10px 18px 12px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  justify-content: flex-end;
}

.vp-footer-link {
  background: transparent;
  border: none;
  color: #0284c7;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
}

.vp-footer-link:hover {
  color: #0369a1;
  text-decoration: underline;
}

/* Row 4: 3 Bottom Insight Cards */
.vp-bottom-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* Period Highlights Timeline */
.vp-timeline {
  position: relative;
  padding: 14px 18px;
}

.vp-timeline-item {
  position: relative;
  padding-left: 24px;
  padding-bottom: 16px;
}

.vp-timeline-item:last-child {
  padding-bottom: 0;
}

.vp-timeline-item::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 14px;
  bottom: -4px;
  width: 2px;
  background: #e2e8f0;
}

.vp-timeline-item:last-child::before {
  display: none;
}

.vp-timeline-dot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #cbd5e1;
}

.vp-timeline-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 2px;
}

.vp-timeline-lord {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.vp-timeline-date {
  font-size: 11px;
  color: #64748b;
}

.vp-timeline-desc {
  margin: 0;
  font-size: 11.5px;
  color: #475569;
  line-height: 1.4;
}

/* Key Insights */
.vp-insights-body {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vp-insight-box {
  border-radius: 8px;
  padding: 10px 12px;
  border: 1px solid transparent;
}

.vp-insight-supportive {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.vp-insight-neutral {
  background: #fffbeb;
  border-color: #fde68a;
}

.vp-insight-caution {
  background: #fef2f2;
  border-color: #fecaca;
}

.vp-insight-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.vp-insight-supportive .vp-insight-head { color: #15803d; }
.vp-insight-neutral .vp-insight-head { color: #b45309; }
.vp-insight-caution .vp-insight-head { color: #b91c1c; }

.vp-insight-icon {
  font-size: 13px;
}

.vp-insight-list {
  margin: 0;
  padding-left: 18px;
  font-size: 11.5px;
  color: #334155;
  line-height: 1.45;
}

.vp-insight-list li {
  margin-bottom: 2px;
}

/* General Outlook Gauge */
.vp-outlook-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.vp-gauge-wrap {
  position: relative;
  width: 104px;
  height: 104px;
  margin: 4px auto 10px;
}

.vp-gauge-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.vp-gauge-val {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
}

.vp-gauge-val small {
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
  margin-top: 2px;
}

.vp-gauge-label {
  font-size: 13.5px;
  font-weight: 700;
  color: #059669;
  margin-bottom: 8px;
}

.vp-outlook-desc {
  margin: 0;
  font-size: 11.5px;
  color: #475569;
  line-height: 1.45;
  text-align: center;
}

/* Modal Popup */
.vp-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

.vp-modal[hidden] {
  display: none;
}

.vp-pop {
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.vp-pop-header,
.vp-pop-footer {
  padding: 14px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vp-pop-footer {
  border-bottom: none;
  border-top: 1px solid #e2e8f0;
}

.vp-pop-header h3 {
  margin: 0;
  font-size: 15px;
  color: #0f172a;
}

.vp-pop-list {
  overflow-y: auto;
  max-height: 380px;
  margin: 12px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.vp-pop-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
  color: #1e293b;
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.vp-pop-item:hover,
.vp-pop-item.active {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
}

/* Print Styles */
@media print {
  body * {
    visibility: hidden;
  }
  #varshphal, #varshphal * {
    visibility: visible;
  }
  #varshphal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #ffffff !important;
  }
  .vp-controls-bar,
  .vp-btn-action,
  .vp-modal {
    display: none !important;
  }
  .vp-card {
    box-shadow: none !important;
    border: 1px solid #cbd5e1 !important;
  }
}

/* Responsiveness */
@media (max-width: 1024px) {
  .vp-summary-grid {
    grid-template-columns: 1fr;
  }
  .vp-row-2col {
    grid-template-columns: 1fr;
  }
  .vp-bottom-grid {
    grid-template-columns: 1fr;
  }
}
