/* Birth Details and Panchang Modern Dashboard Stylesheet */
.bp-page {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink, #1e293b);
  background: var(--paper, #f4f7fb);
  padding: 14px 18px 32px;
  border-radius: 12px;
  min-height: 100%;
  box-sizing: border-box;
}

/* Hero Header */
.bp-hero {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.bp-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.bp-user-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bp-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.bp-user-meta h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.bp-user-meta p {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.bp-hero-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bp-pill-select {
  appearance: none;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 28px 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2364748b'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 16px;
  transition: all 0.15s;
}

.bp-pill-select:hover {
  border-color: #3b82f6;
}

.bp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  transition: all 0.15s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

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

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

.bp-btn-primary:hover {
  background: #1557b0;
  color: #ffffff;
}

/* Secondary Meta Strip */
.bp-hero-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  flex-wrap: wrap;
}

.bp-meta-tags {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.bp-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #475569;
}

.bp-meta-icon {
  font-size: 14px;
}

.bp-meta-item b,
.bp-meta-item strong {
  color: #0f172a;
  font-weight: 600;
}

.bp-export-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Grid Layouts */
.bp-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

/* Cards */
.bp-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);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

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

/* Key Panchang values carry an explanatory native browser tooltip on hover. */
.bp-has-tooltip {
  cursor: help;
}

.bp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
}

.bp-card-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bp-card-icon {
  font-size: 16px;
  color: #0284c7;
  display: grid;
  place-items: center;
}

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

.bp-card-action-icon {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  font-size: 13px;
  border-radius: 4px;
  transition: all 0.15s;
}

.bp-card-action-icon:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.bp-card-subtitle {
  font-size: 11px;
  color: #64748b;
  margin-left: auto;
}

.bp-card-body {
  padding: 12px 16px 14px;
  flex: 1;
}

/* Key-Value Lists */
.bp-kv-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bp-kv-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 1.5fr;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f8fafc;
}

.bp-kv-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.bp-kv-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
}

.bp-kv-label-ico {
  font-size: 13px;
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}

.bp-kv-val {
  font-weight: 600;
  color: #1e293b;
  word-break: break-word;
}

/* 2-Column Key Astrological Data */
.bp-dual-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.bp-dual-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f8fafc;
  font-size: 12px;
}

.bp-dual-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.bp-dual-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 12px;
  flex-shrink: 0;
  background: #f1f5f9;
  color: #475569;
}

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

.bp-dual-label {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 1px;
}

.bp-dual-val {
  font-weight: 700;
  color: #0f172a;
}

/* Inner Green Cardlet for Annual Lagna / Varshphal */
.bp-annual-cardlet {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bp-annual-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.bp-annual-label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #166534;
  font-weight: 600;
}

.bp-annual-val {
  font-weight: 700;
  color: #0f172a;
}

/* Tables */
.bp-table-wrap {
  overflow-x: auto;
  padding: 6px 16px 12px;
}

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

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

.bp-table td {
  padding: 7px 6px;
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  white-space: nowrap;
}

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

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

.bp-planet-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.bp-glyph {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

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

.bp-badge-retro {
  background: #f1f5f9;
  color: #0284c7;
  border: 1px solid #cbd5e1;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
}

.bp-link-hora {
  color: #0284c7;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.bp-link-hora:hover {
  text-decoration: underline;
}

/* Row 3: Bottom Hora Panels */
.bp-current-hora-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
}

.bp-hora-main-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #e0f2fe;
  color: #0284c7;
  display: grid;
  place-items: center;
  font-size: 24px;
  flex-shrink: 0;
  border: 1px solid #bae6fd;
}

.bp-hora-main-info {
  flex: 1;
}

.bp-hora-main-info h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.bp-hora-main-info p {
  margin: 2px 0 0;
  font-size: 11.5px;
  color: #64748b;
}

.bp-hora-main-times {
  display: flex;
  gap: 16px;
  font-size: 11.5px;
  margin-top: 6px;
  color: #475569;
}

.bp-hora-main-times span.label {
  color: #64748b;
  font-weight: 500;
  display: block;
  font-size: 10px;
}

/* 5 Hora Sequence Strip */
.bp-hora-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 6px 0;
}

.bp-hora-seq-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.bp-hora-seq-card.active {
  background: #eff6ff;
  border-color: #93c5fd;
  box-shadow: 0 0 0 1px #3b82f6;
}

.bp-hora-seq-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
}

.bp-hora-seq-name {
  font-size: 11px;
  font-weight: 700;
  color: #1e293b;
}

.bp-hora-seq-time {
  font-size: 9.5px;
  color: #64748b;
  line-height: 1.25;
}

/* Natal vs Transit Hora Comparison */
.bp-hora-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}

.bp-compare-box {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 11.5px;
}

.bp-compare-natal {
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.bp-compare-transit {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.bp-compare-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
  margin-bottom: 2px;
}

.bp-compare-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.bp-compare-desc {
  margin: 0;
  font-size: 11px;
  color: #475569;
  line-height: 1.4;
}

.bp-compare-arrow {
  font-size: 18px;
  color: #0284c7;
  font-weight: bold;
}

/* Responsive */
@media (max-width: 1024px) {
  .bp-grid-3 {
    grid-template-columns: 1fr;
  }
  .bp-hero-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .bp-hero-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
  .bp-export-actions {
    margin-left: 0;
    width: 100%;
    justify-content: flex-end;
  }
}

/* Print Styles */
@media print {
  body * {
    visibility: hidden;
  }
  #birth_panchang, #birth_panchang * {
    visibility: visible;
  }
  #birth_panchang {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #ffffff !important;
  }
  .bp-hero-actions,
  .bp-export-actions,
  .bp-card-action-icon {
    display: none !important;
  }
  .bp-card {
    box-shadow: none !important;
    border: 1px solid #cbd5e1 !important;
  }
}
