*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  color: var(--text-1);
  font-family: var(--font-ui);
  line-height: 1.5;
  background:
    radial-gradient(circle at 20% 20%, #f7efe1 0%, transparent 42%),
    radial-gradient(circle at 80% 10%, #e6f5f3 0%, transparent 36%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0));
}

body {
  min-height: 100vh;
}

.bg-orb {
  position: fixed;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(28px);
  opacity: 0.45;
}

.orb-1 {
  top: -90px;
  right: -60px;
  width: 280px;
  height: 280px;
  background: #ffd089;
}

.orb-2 {
  bottom: -70px;
  left: -50px;
  width: 220px;
  height: 220px;
  background: #8ad3c8;
}

.app {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  gap: var(--space-4);
  padding: var(--space-4);
}

.sidebar {
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(10px);
}

.brand h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1.1;
}

.brand p {
  margin: 0.5rem 0 0;
  color: var(--text-2);
  font-size: 0.9rem;
}

.nav {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.nav-item {
  padding: 0.72rem 0.85rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-1);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  background: transparent;
  transition: 180ms ease;
}

.nav-item:hover {
  border-color: #e8e1d1;
  background: #f6f2ea;
}

.nav-item.active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
}

.main {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  gap: var(--space-4);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
}

.topbar h2 {
  margin: 0;
  font-size: 1.25rem;
}

.topbar p {
  margin: 0.4rem 0 0;
  color: var(--text-2);
}

.topbar-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.topbar-actions {
  gap: var(--space-2);
}

.btn {
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn-ghost {
  color: var(--text-1);
  background: #fff;
}

.btn-primary {
  border-color: transparent;
  color: #fff;
  background: var(--accent);
}

.workspace {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.panel,
.dashboard-card {
  padding: var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  box-shadow: var(--shadow-panel);
}

.panel h3 {
  margin: 0 0 0.5rem;
}

.panel p,
.dashboard-card p {
  margin: 0;
  color: var(--text-2);
  line-height: 1.55;
}

.span-2,
.dashboard-card-hero,
.dashboard-card-wide {
  grid-column: span 2;
}

.dashboard-card-hero {
  background: linear-gradient(135deg, #fff 0%, #f8f2e8 100%);
}

.dashboard-card h4 {
  margin: 0 0 0.6rem;
}

.dashboard-card strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--brand-1);
  font-size: 2rem;
  line-height: 1;
}

#sectionHost {
  min-height: 90px;
  margin-top: 0.8rem;
  padding: var(--space-3);
  border: 1px dashed #d4cab7;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  background: #fffcf6;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease;
}

#sectionHost.route-exit-active {
  opacity: 0;
  transform: translateY(8px);
}

#sectionHost.route-enter-active {
  opacity: 1;
  transform: translateY(0);
}

.route-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid #eedbb7;
  border-radius: 999px;
  color: var(--text-2);
  font-weight: 600;
  background: #fff7e8;
}

.route-loading-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  animation: routePulse 900ms ease-in-out infinite;
}

@keyframes routePulse {

  0%,
  100% {
    opacity: 0.6;
    transform: scale(0.85);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.form-grid {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  background: #fff;
}

.form-grid>* {
  min-width: 0;
}

.kp-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.kp-checkbox-control {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  white-space: nowrap;
}

.kp-checkbox-control input {
  width: auto;
  margin: 0;
}

.kp-event-control {
  display: grid;
  grid-template-columns: auto minmax(12rem, 18rem);
  align-items: center;
  gap: 0.55rem;
  margin: 0;
}

.kp-event-control select {
  width: 100%;
}

@media (max-width: 760px) {
  .kp-controls {
    align-items: stretch;
  }

  .kp-event-control {
    width: 100%;
    grid-template-columns: 1fr;
  }
}



.field-label {
  margin-top: 0.2rem;
  color: var(--text-2);
  font-size: 0.85rem;
  font-weight: 700;
}

.form-errors {
  margin-bottom: 0.8rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid #e9b9b9;
  border-radius: 10px;
  color: #8a2f2f;
  background: #fff3f3;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 0.55rem 0.45rem;
  border-bottom: 1px solid #ece2cf;
  text-align: left;
  vertical-align: top;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.dashboard-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.dashboard-list>div {
  padding: 0.75rem;
  border: 1px solid #efe6d2;
  border-radius: 12px;
  background: #fffcf6;
}

.dashboard-list span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text-2);
  font-size: 0.8rem;
}

/* Astrology */

/* .astro-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
} */

.astro-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 32rem), 1fr));
  gap: var(--space-4);
}

.astro-chart-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.55rem;
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fffdfa;
}

.astro-chart-card header {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
}

.astro-chart-card p {
  margin: 0.45rem 0 0.7rem;
  color: var(--text-2);
}

.astro-chart-card-meta {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.astro-chart-card-title {
  color: var(--brand-1);
  font-size: 0.95rem;
  font-weight: 700;
}

.astro-chart-card-subtitle {
  color: var(--text-2);
  font-size: 0.82rem;
}

.astro-chart-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.2rem;
}

.astro-chart-chip,
.astro-cusp-pill {
  display: inline-block;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  color: #6d5332;
  font-size: 0.72rem;
  background: #f4ebd8;
}

.astro-chart-preview {
  display: grid;
  min-height: 120px;
  height: 120px;
  place-items: center;
  border: 1px dashed #cfbfa1;
  border-radius: var(--radius-sm);
  background: #fff7e9;
}

.astro-chart-preview-computed {
  display: grid;
  min-height: 510px;
  height: 510px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #dfd0b8;
  border-radius: var(--radius-sm);
  background: #fffdfa;
}

/* Pending Varga cards remain compact. */
.astro-chart-preview-computed:not(:has(.vedic-chart-svg-compact)) {
  min-height: 150px;
  height: 150px;
  border-style: dashed;
  background: #fff7e9;
}

.astro-chart-preview-computed .vedic-chart-wrap {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  overflow: hidden;
  padding: 0.75rem;
}

.astro-chart-preview-computed .vedic-chart-svg-compact {
  display: block;
  width: min(100%, 560px);
  max-height: 480px;
  min-width: 0;
  height: auto;
}

.astro-style-north {
  background:
    linear-gradient(45deg, transparent 49%, #d8c7a8 49%, #d8c7a8 51%, transparent 51%),
    linear-gradient(-45deg, transparent 49%, #d8c7a8 49%, #d8c7a8 51%, transparent 51%),
    #fff7e9;
}

.astro-style-south {
  background:
    linear-gradient(90deg, transparent 24%, #d8c7a8 24%, #d8c7a8 26%, transparent 26%, transparent 49%, #d8c7a8 49%, #d8c7a8 51%, transparent 51%, transparent 74%, #d8c7a8 74%, #d8c7a8 76%, transparent 76%),
    linear-gradient(0deg, transparent 24%, #d8c7a8 24%, #d8c7a8 26%, transparent 26%, transparent 49%, #d8c7a8 49%, #d8c7a8 51%, transparent 51%, transparent 74%, #d8c7a8 74%, #d8c7a8 76%, transparent 76%),
    #fff7e9;
}

.astro-chart-preview-label {
  padding: 0.25rem 0.55rem;
  border: 1px solid #dcc7a3;
  border-radius: 999px;
  color: #7a6542;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgb(255 255 255 / 82%);
}

.astro-table-wrap {
  overflow-x: auto;
}


.astro-table-wrap {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

/* .astro-planets-table {
  min-width: 1180px;
} */

.astro-planets-table {
  width: max-content;
  min-width: 1180px;
}

.astro-planets-table th,
.astro-planets-table td {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

/* .astro-planets-table th {
  white-space: normal;
} */

/* .astro-highlights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.7rem;
} */



.kp-support-windows-table {
  min-width: 1240px;
}

.kp-support-windows-table th,
.kp-support-windows-table td {
  white-space: nowrap;
  overflow-wrap: normal;
}

.kp-support-windows-table th {
  white-space: normal;
}

.kp-support-windows-table td:last-child {
  min-width: 20rem;
  white-space: normal;
}



.astro-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem;
  margin-top: 0.7rem;
}

.astro-highlights-compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 0.75rem;
}

.astro-birth-summary {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0;
}

.astro-birth-summary .astro-highlight-card {
  min-width: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
}

.astro-birth-summary .astro-highlight-card strong {
  margin-bottom: 0.12rem;
  font-size: 0.68rem;
  line-height: 1.2;
}

.astro-birth-summary .astro-highlight-card span {
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
  line-height: 1.25;
}

.astro-highlight-card {
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf8;
}

.astro-highlight-card strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text-2);
  font-size: 0.8rem;
}

.astro-highlight-card span {
  color: var(--brand-1);
  font-size: 0.95rem;
  font-weight: 700;
}

.astro-primary-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: var(--space-4);
}

.astro-primary-chart {
  min-width: 0;
  padding: var(--space-3);
  border: 1px solid #e8dfcf;
  border-radius: var(--radius-md);
  background: #fffdfa;
}

.astro-main-chart {
  display: grid;
  gap: 0.75rem;
}

.astro-main-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.astro-main-chart-header span {
  color: var(--text-2);
  font-size: 0.85rem;
}

.astro-primary-chart .vedic-chart-wrap {
  padding-bottom: 0;
}

.astro-primary-chart .vedic-chart-svg {
  width: min(100%, 520px);
}

.astro-d9-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.65rem;
  color: var(--text-2);
  font-size: 0.82rem;
}

.astro-d9-summary span {
  padding: 0.2rem 0.5rem;
  border: 1px solid #eadfca;
  border-radius: 999px;
  background: #fff7e9;
}

.astro-runtime-debug {
  max-height: 22rem;
  margin: 0.75rem 0 0;
  padding: 0.75rem;
  overflow: auto;
  border: 1px solid var(--line);
  color: #3d2b1d;
  font-size: 0.75rem;
  line-height: 1.45;
  white-space: pre-wrap;
  background: #fffdf8;
}

/* Vedic charts */

.vedic-chart-wrap {
  display: grid;
  width: 100%;
  place-items: center;
  overflow-x: auto;
  padding: 0.75rem 0;
}

.vedic-chart-svg {
  display: block;
  width: min(100%, 680px);
  height: auto;
  background: #fffdfa;
}

.vedic-chart-border,
.vedic-south-box {
  fill: #fffdf8;
  stroke: #3c2b1b;
  stroke-width: 2;
}

.vedic-chart-line {
  fill: none;
  stroke: #3c2b1b;
  stroke-width: 2;
}

.vedic-house-number,
.vedic-rashi-number {
  fill: #7a3825;
  font-weight: 800;
  text-anchor: middle;
}

.vedic-house-number {
  font-size: 11px;
}

.vedic-rashi-number {
  font-size: 15px;
}

.vedic-ascendant-label {
  fill: #b33d2d;
  font-size: 11px;
  font-weight: 800;
  text-anchor: middle;
}

.vedic-ascendant-degree {
  fill: #24170e;
  font-size: 12px;
  font-weight: 700;
  text-anchor: middle;
  paint-order: stroke;
  stroke: #fffdfa;
  stroke-width: 3px;
  stroke-linejoin: round;
}

/* .vedic-sign-name {
  fill: #24170e;
  font-size: 13px;
  font-weight: 700;
  text-anchor: middle;
} */

/* .vedic-planets {
  fill: #3d2b1d;
  font-size: 10px;
  text-anchor: middle;
  paint-order: stroke;
  stroke: #fffdfa;
  stroke-width: 3px;
  stroke-linejoin: round;
}

.vedic-planets {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
} */


/* .vedic-planets {
  fill: #3d2b1d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-anchor: middle;
  paint-order: stroke;
  stroke: #fffdfa;
  stroke-width: 3px;
  stroke-linejoin: round;
} */


.vedic-planets {
  fill: #563a25;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0;
  text-anchor: middle;
  paint-order: stroke;
  stroke: #fffdfa;
  stroke-width: 2px;
  stroke-linejoin: round;
}


.vedic-south-cell .vedic-rashi-number,
.vedic-south-cell .vedic-ascendant-label,
.vedic-south-cell .vedic-sign-name {
  text-anchor: start;
}

.vedic-south-cell .vedic-planets {
  text-anchor: middle;
}



.vedic-south-center {
  fill: #f7ebd4;
  stroke: #3c2b1b;
  stroke-width: 2;
}

.vedic-center-label {
  fill: #5b311c;
  font-size: 16px;
  font-weight: 700;
  text-anchor: middle;
}

.vedic-center-label-small {
  fill: #6d5332;
  font-size: 12px;
  text-anchor: middle;
}

.vedic-retrograde {
  fill: #b33d2d;
  font-weight: 700;
}

.table-retrograde {
  color: #b33d2d;
  font-weight: 800;
}


.vedic-chart-svg-compact .vedic-rashi-number {
  font-size: 11px;
}

.vedic-chart-svg-compact .vedic-ascendant-label {
  font-size: 10px;
}

.vedic-chart-svg-compact .vedic-planets,
.vedic-chart-svg-compact .vedic-retrograde {
  font-size: 10px;
}



/* Legacy circular-chart support */

.astro-chart-preview-wheel {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 170px;
  padding: 0.25rem;
  background: #fff7e9;
}

.astro-wheel-svg {
  display: block;
  width: 100%;
  height: auto;
}

.astro-wheel-ring {
  fill: #fffdf8;
  stroke: #d8c8a3;
  stroke-width: 2;
}

.astro-wheel-inner {
  fill: #fff7ea;
  stroke: #d8c8a3;
  stroke-width: 1.2;
}

.astro-wheel-line {
  stroke: #eadbc0;
  stroke-width: 1;
}

.astro-wheel-sign {
  fill: #7a6542;
  font-size: 10px;
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: middle;
}

.astro-wheel-planet-label {
  fill: #5b4223;
  font-size: 9px;
  font-weight: 700;
}

.astro-wheel-ascendant {
  stroke: #c24f3c;
  stroke-width: 2.2;
}

.astro-wheel-center {
  fill: #784f22;
}

/* @media (max-width: 1080px) {
  .astro-primary-chart-grid {
    grid-template-columns: 1fr;
  }
} */

@media (max-width: 1200px) {
  .app {
    grid-template-columns: 1fr;
    padding: var(--space-3);
  }

  .workspace,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .span-2,
  .dashboard-card-hero,
  .dashboard-card-wide {
    grid-column: span 1;
  }

  .dashboard-list {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .kp-ruling-planets-card {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 900px) {

  .astro-highlights,
  .astro-highlights-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .astro-chart-grid {
    grid-template-columns: 1fr;
  }

  .astro-chart-preview-computed {
    min-height: 400px;
    height: 400px;
  }

  .astro-chart-preview-computed:not(:has(.vedic-chart-svg-compact)) {
    min-height: 150px;
    height: 150px;
  }

  .astro-chart-preview-computed .vedic-chart-svg-compact {
    max-height: 370px;
  }

  .astro-highlights,
  .astro-highlights-compact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .vedic-chart-svg {
    min-width: 0;
  }

  .vedic-planets {
    font-size: 8px;
  }
}


.dasha-toggle {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent, #2f766f);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.dasha-toggle:hover {
  background: rgba(47, 118, 111, 0.1);
}

.dasha-lord {
  display: inline-block;
  font-weight: 600;
}

.dasha-level-indent-0 {
  padding-left: 0;
}

.dasha-level-indent-1 {
  padding-left: 1.25rem;
}

.dasha-level-indent-2 {
  padding-left: 2.5rem;
}

.dasha-level-indent-3 {
  padding-left: 3.75rem;
}

.dasha-level-indent-4 {
  padding-left: 5rem;
}





.data-table tbody tr.dasha-level-maha td {
  color: #215c57;
  /* background: #edf7f5; */
  background: #f8f6ef;
  font-size: 0.96rem;
  font-weight: 500;
}

.data-table tbody tr.dasha-level-antara td {
  color: #355d85;
  background: #f1f6fb;
  font-size: 0.9rem;
}

.data-table tbody tr.dasha-level-pratyantara td {
  color: #7a4f20;
  background: #fff8ec;
  font-size: 0.88rem;
}

.data-table tbody tr.dasha-level-sookshma td {
  color: #6a477c;
  background: #faf2fc;
  font-size: 0.86rem;
}

.data-table tbody tr.dasha-level-prana td {
  color: #5c5f35;
  background: #fffffe;
  font-size: 0.84rem;
}

.data-table tbody tr.dasha-current-row td {
  background: #d8eee8;
  color: #174b45;
  font-weight: 700;
  /* box-shadow: inset 4px 0 0 #16806f; */
}

.data-table tbody tr.dasha-current-row td:last-child {
  color: #0b6559;
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: uppercase;
}


.dasha-periods-table thead th {
  color: #3f5155;
  /* background-color: #d7f2f7; */
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;

}

.dasha-periods-table tbody td {
  font-size: 0.86rem;
  line-height: 1.35;
}

/* .data-table th,
.data-table td {
 white-space: wrap;
  text-align: center;    
  vertical-align: middle;
} */


.data-table tbody td {
  font-size: 0.9rem;
  line-height: 1.35;
}


.dasha-summary h4 {
  margin-bottom: 0.85rem;
  color: #334448;
  font-size: 1.1rem;
  font-weight: 800;
}

/* .dasha-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
} */

.dasha-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 0.75rem;
}

.dasha-summary-grid>div {
  min-width: 0;
  padding: 0.7rem 0.8rem;
  border: 1px solid #e9dfcf;
  border-radius: 8px;
  background: #fffcf6;
}

.dasha-summary-grid span {
  display: block;
  margin-bottom: 0.28rem;
  color: #596a6e;
  font-size: 0.88rem;
  font-weight: 700;
}

.dasha-summary-grid strong {
  display: block;
  margin: 0;
  color: #2f766f;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}



.data-table tbody tr.kp-dasha-level-maha td {
  background: #f8f6ef;
  color: #215c57;
  font-weight: 600;
}

.data-table tbody tr.kp-dasha-level-antara td {
  background: #f1f6fb;
  color: #355d85;
}

.data-table tbody tr.kp-dasha-level-pratyantara td {
  background: #fff8ec;
  color: #7a4f20;
}


.data-table tbody tr.kp-dasha-current-row td {
  background: #d8eee8;
  color: #174b45;
  font-weight: 700;
  /* box-shadow: inset 4px 0 0 #16806f; */
}

.kp-eligibility {
  display: inline-block;
  min-width: 5.5rem;
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
}

.kp-eligibility-strong {
  background: #d8eee8;
  color: #174b45;
}

.kp-eligibility-mixed {
  background: #fff0c9;
  color: #7a4f20;
}

.kp-eligibility-weak {
  background: #f9dfe0;
  color: #8a2730;
}

.kp-venus-potential-present {
  color: #a13f76;
  font-weight: 700;
}

.kp-venus-potential-absent {
  color: #667085;
}



.astro-analysis-results {
  display: grid;
  gap: 0.75rem;
}

.astro-analysis-result {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fffdf8;
}

.astro-analysis-result header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.astro-analysis-result header strong {
  color: var(--text-1);
  font-size: 1rem;
}

.astro-analysis-result header span {
  flex: 0 0 auto;
  padding: 0.18rem 0.5rem;
  border: 1px solid #d7caa9;
  border-radius: 999px;
  color: #76501f;
  background: #fff5dc;
  font-size: 0.78rem;
  font-weight: 700;
}

.astro-analysis-result ul {
  margin: 0.65rem 0 0;
  padding-left: 1.2rem;
  color: var(--text-2);
}

.astro-analysis-result li+li {
  margin-top: 0.3rem;
}

.prediction-period-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.prediction-period {
  min-width: 0;
  padding: 0.8rem;
  border: 1px solid #d9e4df;
  border-radius: 8px;
  background: #fbfdfb;
}

.prediction-period span,
.prediction-period small {
  display: block;
  color: var(--text-2);
}

.prediction-period span {
  margin-bottom: 0.3rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.prediction-period strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #215c57;
  font-size: 1.05rem;
}

.prediction-period small {
  font-size: 0.8rem;
  line-height: 1.35;
}

.prediction-theme .prediction-level-active {
  border-color: #a9d7c7;
  color: #1c6253;
  background: #e7f5ef;
}

.prediction-theme .prediction-level-supportive {
  border-color: #bfd4e7;
  color: #285a82;
  background: #edf5fb;
}

.prediction-theme .prediction-level-requires-attention {
  border-color: #e6ca94;
  color: #805717;
  background: #fff6df;
}

.vedic-kp-house-label {
  fill: #245f58;
  font-size: 10px;
  font-weight: 800;
}

/* .kp-ruling-planets-card {
  width: 50%;
  min-width: 280px;
} */


.kp-ruling-planets-card {
  width: 100%;
  min-width: 0;
}

.kp-ruling-planets-table {
  width: 100%;
  min-width: 28rem;
}

.kp-ruling-planets-table th,
.kp-ruling-planets-table td {
  white-space: nowrap;
}



.kp-ruling-planets-card .kp-ruling-planets-table {
  width: 100%;
}

.kp-ruling-planets-card .kp-ruling-planets-table td:last-child {
  width: 4.5rem;
}



/* .kp-aspect-legends {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 0.9rem;
  margin: 0.85rem 0;
} */

/* .kp-aspect-legends {
 
  display: flex;
 
  gap: 0.9rem;
  margin: 0.85rem 0;
  padding: 1.5rem;
  width: 60%;

 
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
} */


.kp-aspect-legends {
  display: grid;
  grid-template-columns: minmax(28rem, max-content) minmax(16rem, max-content);
  gap: 0.9rem;
  width: max-content;
  padding: 0.75rem;
}

.kp-aspect-legend {
  font-size: 0.82rem;
}

.kp-aspect-matrix {
  min-width: 1140px;
  table-layout: fixed;
}




/* .kp-aspect-matrix thead th,
.kp-aspect-row-header {
  background: #fff8df;
  
  color: #5d4a1d;
} */

.kp-aspect-matrix th span,
.kp-aspect-matrix th small {
  display: block;
  margin-top: 0.16rem;
  font-weight: 500;
}


/*----------NEW------------------------------------------------------------------------------*/
.kp-aspect-matrix th,
.kp-aspect-matrix td {
  min-width: 112px;
  padding: 0.3rem;
  text-align: center;
  vertical-align: middle;
}

.kp-aspect-matrix thead th,
.kp-aspect-row-header {
  /* background: #fff8df; */
  background: #fdfdf1;
  color: #5d4a1d;
  font-size: 0.78rem;
  line-height: 1.2;
}

.kp-aspect-matrix thead th strong,
.kp-aspect-row-header strong {
  display: block;
  margin: 0;
  color: #5d4a1d;
  font-size: 0.9rem;
  line-height: 1.15;
}

.kp-aspect-matrix thead th span,
.kp-aspect-row-header span,
.kp-aspect-matrix thead th small {
  font-size: 0.7rem;
}

.kp-aspect-cell {
  position: relative;
  min-height: 96px;
  padding: 1.45rem 0.3rem 0.35rem;
  color: #1f2933;
}

.dashboard-card .kp-aspect-rule-angle,
.dashboard-card .kp-aspect-orb {
  position: absolute;
  top: 0.28rem;
  margin: 0;
  color: inherit;
  font-size: 0.6rem;
  font-weight: 600;
  line-height: 1;
}

.dashboard-card .kp-aspect-rule-angle {
  left: 0.3rem;
}

.dashboard-card .kp-aspect-orb {
  right: 0.3rem;
}

.dashboard-card .kp-aspect-code {
  display: block;
  margin: 0;
  color: inherit;
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1.12;
}

.dashboard-card .kp-aspect-actual-angle {
  display: block;
  margin: 1rem 0 0.22rem;
  color: #246f6b;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1;
}

.dashboard-card .kp-aspect-polarity,
.dashboard-card .kp-aspect-strength {
  display: block;
  margin: 0.20rem;
  color: inherit;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1.50;
}

/*-------------------------------------------------------------------------------------------*/

.kp-aspect-empty,
.kp-aspect-self {
  background: #f7f7f7;
  color: #9aa1a8;
}

.kp-aspect-blue {
  background: #b9dcff;
}

.kp-aspect-light-green {
  background: #dff3d5;
}

.kp-aspect-medium-light-green {
  background: #b9e8ad;
}

.kp-aspect-green {
  background: #73cc73;
}

.kp-aspect-light-pink {
  background: #ffdce3;
}

.kp-aspect-medium-pink {
  background: #f5a8ba;
}

.kp-aspect-red {
  background: #ec6c6c;
  color: #3c1111;
}

.kp-aspect-color-swatch {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  margin-right: 0.35rem;
  border: 1px solid rgb(0 0 0 / 20%);
  vertical-align: -0.08rem;
}

.kp-aspect-direction-note,
.kp-aspect-source-note {
  margin: 0.65rem 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .kp-aspect-legends {
    grid-template-columns: 1fr;
  }
}

.astro-global-controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.astro-global-node-control {
  display: grid;
  grid-template-columns: auto minmax(8rem, 11rem);
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}

.astro-global-node-control select {
  width: 100%;
}

.astro-chart-style-control {
  display: grid;
  gap: 0.35rem;
}

.astro-global-control-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.astro-chart-style-control .form-actions {
  margin: 0;
}

/* .astro-mode-controls {
  margin-top: 0.85rem;
} */

.astro-chart-style-button {
  min-width: 8.75rem;
  border-radius: 6px;
}

.astro-chart-style-north.btn-ghost {
  border-color: #d7a64a;
  color: #76501f;
  background: #fff8e7;
}

.astro-chart-style-north.btn-primary {
  border-color: #a87316;
  color: #fff;
  background: #b87918;
}

.astro-chart-style-south.btn-ghost {
  border-color: #4f9d93;
  color: #17635b;
  background: #edf8f5;
}

.astro-chart-style-south.btn-primary {
  border-color: #247267;
  color: #fff;
  background: #2f766f;
}

@media (max-width: 760px) {
  .astro-global-controls {
    align-items: stretch;
  }

  .astro-global-node-control {
    width: 100%;
    grid-template-columns: 1fr;
  }
}

.prashna-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.prashna-form-grid label {
  margin: 0.2rem 0 0;
}

.prashna-form-grid textarea,
.prashna-form-grid input {
  min-width: 0;
  width: 100%;
}

.prashna-question-display {
  margin-top: 0.65rem !important;
  color: var(--text-1) !important;
  font-weight: 600;
}

@media (max-width: 760px) {
  .prashna-form-grid {
    grid-template-columns: 1fr;
  }
}



/*------------------- Mobile Friendly Astrology fixes ---------------------------*/

@media (max-width: 760px) {

  .dashboard-card,
  .panel {
    padding: 0.9rem;
    border-radius: 8px;
  }

  .dashboard-card h4 {
    margin-top: 0;
    font-size: 1rem;
    line-height: 1.3;
  }

  .dashboard-card p {
    font-size: 0.9rem;
  }

  .astro-global-controls {
    gap: 0.85rem;
  }

  .astro-chart-style-control,
  .astro-global-node-control {
    width: 100%;
  }

  .astro-chart-style-control .form-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .astro-chart-style-button {
    min-width: 0;
    width: 100%;
  }

  /* .astro-mode-controls {
    display: flex;
    flex-wrap: nowrap;
    width: calc(100% + 1.8rem);
    margin: 0.9rem -0.9rem -0.9rem;
    padding: 0.7rem 0.9rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    border-top: 1px solid var(--line);
    background: #fffdf8;
    scrollbar-width: none;
  } */

  /* .astro-mode-controls::-webkit-scrollbar {
    display: none;
  } */

  /* .astro-mode-controls .btn {
    flex: 0 0 auto;
    min-height: 2.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.84rem;
    white-space: nowrap;
  } */

  .astro-primary-chart {
    padding: 0.75rem;
  }

  .astro-main-chart-header {
    align-items: flex-start;
    gap: 0.25rem;
  }

  .astro-main-chart-header span {
    font-size: 0.78rem;
  }

  .vedic-chart-wrap {
    padding: 0.4rem 0;
    overflow: hidden;
  }

  .vedic-chart-svg {
    width: 100%;
    max-height: none;
  }

  .astro-chart-preview-computed {
    min-height: 0;
    height: auto;
    aspect-ratio: 7 / 6;
  }

  .astro-chart-preview-computed:not(:has(.vedic-chart-svg-compact)) {
    min-height: 9rem;
    height: 9rem;
    aspect-ratio: auto;
  }

  .astro-chart-preview-computed .vedic-chart-wrap {
    padding: 0.45rem;
  }

  .astro-chart-preview-computed .vedic-chart-svg-compact {
    width: 100%;
    max-height: none;
  }

  .astro-birth-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
  }

  .astro-highlights {
    gap: 0.5rem;
  }

  .astro-highlight-card {
    padding: 0.65rem;
    border-radius: 7px;
  }

  .astro-table-wrap {
    position: relative;
    margin-right: -0.1rem;
    padding-bottom: 0.3rem;
    -webkit-overflow-scrolling: touch;
  }

  .data-table th,
  .data-table td {
    padding: 0.5rem;
    font-size: 0.82rem;
  }

  .dasha-summary-grid {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .dashboard-list>div {
    padding: 0.65rem;
  }
}

@media (max-width: 390px) {
  .app {
    padding: 0.65rem;
  }

  .astro-birth-summary {
    grid-template-columns: 1fr;
  }

  /* .astro-mode-controls {
    width: calc(100% + 1.3rem);
    margin-right: -0.65rem;
    margin-left: -0.65rem;
    padding-right: 0.65rem;
    padding-left: 0.65rem;
  } */
}




/* Navigation bar */

@media (max-width: 760px) {
  .app {
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .main {
    gap: 0.75rem;
  }

  .sidebar {
    position: sticky;
    top: 0.5rem;
    z-index: 10;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem;
    border-radius: 8px;
  }

  .brand h1 {
    font-size: 1rem;
    white-space: nowrap;
  }

  .brand p {
    display: none;
  }

  .nav {
    display: flex;
    min-width: 0;
    gap: 0.4rem;
    margin: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    flex: 0 0 auto;
    padding: 0.5rem 0.7rem;
    border-radius: 6px;
    font-size: 0.82rem;
    line-height: 1.2;
    white-space: nowrap;
  }

  .topbar {
    gap: 0.45rem;
    padding: 0.85rem 0.9rem;
    border-radius: 8px;
  }

  .topbar h2 {
    font-size: 1.1rem;
  }

  .topbar p {
    margin-top: 0.2rem;
    font-size: 0.84rem;
  }

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions .btn {
    min-height: 2.4rem;
    padding: 0.45rem 0.7rem;
    border-radius: 6px;
    font-size: 0.82rem;
  }

  #sectionHost {
    margin-top: 0;
    padding: 0.75rem;
    border-radius: 8px;
  }
}

@media (max-width: 390px) {
  .app {
    padding: 0.65rem;
  }

  .sidebar {
    top: 0.35rem;
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
}


@media (max-width: 760px) {

  .dashboard-card,
  .panel {
    padding: 1rem;
  }

  .dashboard-card p,
  .panel p,
  .data-table tbody td {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .data-table th {
    font-size: 0.85rem;
    line-height: 1.35;
  }

  .dasha-periods-table tbody td,
  .data-table tbody tr.dasha-level-maha td,
  .data-table tbody tr.dasha-level-antara td,
  .data-table tbody tr.dasha-level-pratyantara td,
  .data-table tbody tr.dasha-level-sookshma td,
  .data-table tbody tr.dasha-level-prana td {
    font-size: 0.9rem;
    line-height: 1.45;
  }

  .dasha-summary-grid strong {
    font-size: 1rem;
  }

  .brand p {
    display: none;
  }
}





/* Full-width workspace with expandable navigation. */

.app {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
  padding: var(--space-3);
}

.sidebar {
  position: sticky;
  top: var(--space-3);
  z-index: 20;
  padding: 0;
  border-radius: var(--radius-md);
}

.sidebar-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0.8rem 1rem;
}

.brand {
  min-width: 0;
}

.brand h1 {
  font-size: 1.15rem;
  white-space: nowrap;
}

.brand p {
  margin-top: 0.15rem;
  font-size: 0.8rem;
}

.nav-toggle {
  flex: 0 0 auto;
  min-height: 2.5rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text-1);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  background: #fff;
}

.nav {
  display: none;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.5rem;
  margin: 0;
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--line);
}

.nav.nav-open {
  display: grid;
  padding-top: 0.8rem;
}

.nav-item {
  min-width: 0;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  text-align: center;
}

.main,
.workspace,
.panel,
.dashboard-card,
#sectionHost,
.astro-table-wrap {
  min-width: 0;
}

.workspace {
  grid-template-columns: minmax(0, 1fr);
}

.span-2,
.dashboard-card-hero,
.dashboard-card-wide {
  grid-column: span 1;
}


.vastu-workspace-scroll {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 760px) {
  .vastu-workspace-scroll #vastuWorkspaceSvg {
    touch-action: pan-x !important;
  }
}




/*------------------- END OF Mobile Friendly Astrology fixes ---------------------------*/

/* Keep the astrology workspace in one vertical reading flow. */
.astro-primary-chart-grid,
.astro-chart-grid {
  grid-template-columns: minmax(0, 1fr);
}

/* Use the complete workspace width for every astrology section. */
.dashboard-grid {
  grid-template-columns: minmax(0, 1fr);
}


.person-actions {
  display: grid;
  min-width: 8.5rem;
  gap: 0.5rem;
}

.person-actions .btn {
  width: 100%;
  border-radius: 6px;
  text-align: center;
}


.astro-mode-select {
  display: grid;
  width: min(100%, 20rem);
  gap: 0.35rem;
  margin-top: 0.85rem;
}

.astro-mode-select select {
  width: 100%;
  min-height: 2.6rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text-1);
  font: inherit;
  background: #fff;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.nav-toggle span:first-child {
  font-size: 1.15rem;
  line-height: 1;
}

/* Keep both KP aspect legend tables together and scroll them as one unit. */
.kp-aspect-legends {
  display: grid;
  grid-template-columns: max-content max-content;
  width: max-content;
  gap: 0.9rem;
}

.kp-aspect-legend {
  width: max-content;
  white-space: nowrap;
}


/* Portrait phones: show each expanded menu option on its own row. */
@media (max-width: 760px) {
  .sidebar-bar {
    gap: 0.5rem;
    padding: 0.7rem;
  }

  .brand h1 {
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav.nav-open {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
    width: 100%;
    padding: 0.7rem;
  }

  .nav.nav-open .nav-item {
    width: 100%;
    min-width: 0;
    padding: 0.7rem 0.8rem;
    white-space: normal;
    text-align: left;
  }
}


/* Workflow menu is always a single vertical list. */
.nav.nav-open {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  gap: 0.5rem;
  padding: 0.75rem 1rem 1rem;
}

.nav.nav-open .nav-item {
  width: 100%;
  min-width: 0;
  padding: 0.7rem 0.8rem;
  white-space: normal;
  text-align: left;
}

.astro-mode-select {
  width: min(100%, 24rem);
}

.astro-mode-select>span {
  color: var(--brand-1);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}

.astro-mode-select select {
  min-height: 3rem;
  border-color: var(--brand-1);
  color: var(--brand-1);
  font-size: 1rem;
  font-weight: 700;
  background: #fffdfa;
}

.dashboard-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.75rem;
}

.dashboard-summary-card {
  min-width: 0;
  padding: 0.85rem 1rem;
  border-radius: 8px;
}

.dashboard-summary-card span {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-2);
  font-size: 0.82rem;
  font-weight: 700;
}

.dashboard-summary-card strong {
  margin: 0;
  font-size: 1.5rem;
  line-height: 1.1;
}

@media (max-width: 390px) {
  .dashboard-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-summary-card {
    padding: 0.75rem;
  }
}



.vastu-layer-groups {
  display: grid;
  gap: 0.9rem;
}

.vastu-layer-group {
  padding-top: 0.7rem;
  border-top: 1px solid var(--line);
}

.vastu-layer-group:first-child {
  padding-top: 0;
  border-top: 0;
}

.vastu-layer-group h5 {
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.vastu-layer-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1rem;
}

.vastu-layer-controls .kp-checkbox-control {
  gap: 0.3rem;
  font-size: 0.9rem;
}


/* Active Context Pill in Topbar */
.active-context-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  background: #fdf8ee;
  border: 1px solid #eedbb7;
  font-size: 0.85rem;
}

.active-context-pill .context-label {
  color: var(--text-2);
  font-weight: 500;
}

.active-context-pill .context-value {
  color: var(--brand-1);
  font-weight: 700;
}



/* Table Search Box and Panel Header Actions */
.panel-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.table-search-box input {
  padding: 0.5rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 0.88rem;
  min-width: 260px;
  background: #fff;
}

.table-search-box input:focus {
  outline: none;
  border-color: var(--brand-1);
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-active {
  background: #e6f7ec;
  color: #1b7a3e;
  border: 1px solid #c2ebcf;
}

.status-inactive {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

/* Button & Row Helpers */
.btn-sm {
  padding: 0.32rem 0.7rem;
  font-size: 0.82rem;
}

.row-actions {
  display: flex;
  gap: 0.4rem;
}

.btn-danger-ghost:hover {
  color: #c53030;
  border-color: #feb2b2;
}


/* Active Profile Row Highlight */
.data-table tr.row-active {
  background: #fdf8ee !important;
}

.data-table tr.row-active td {
  border-color: #eedbb7;
}

.person-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}


/* Subscription Feature Checkboxes & Quick Buttons */
.feature-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: 0.6rem 0.85rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.feature-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.plan-quick-buttons {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.plan-quick-buttons .btn-sm {
  background: #f8f3ea;
  border: 1px solid #e2d7c5;
}

.status-expired {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.feature-tag {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  margin: 0.1rem;
  background: #f4efe6;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-1);
}


/* Dashboard KPI Grid & Hero Styles */
.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.dashboard-hero-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: 1.4rem 1.6rem;
  background: linear-gradient(135deg, #fffdfa 0%, #f9f2e5 100%);
  border: 1px solid #eedbb7;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}

.hero-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.4rem;
  color: var(--text-2);
  font-size: 0.88rem;
}

.hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  border: 1px solid #ebdcc5;
}

.dashboard-two-col {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: var(--space-3);
}

.quick-action-list {
  display: grid;
  gap: 0.6rem;
}

.quick-action-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0.95rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: 150ms ease;
}

.quick-action-item:hover {
  border-color: var(--brand-1);
  background: #fdfbf7;
}

@media (max-width: 900px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 500px) {
  .dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* Pricing & Subscription Self-Service Styles */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.pricing-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.8rem;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-panel);
  position: relative;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(20, 24, 28, 0.12);
}

.pricing-card-featured {
  border: 2px solid var(--brand-1);
  background: linear-gradient(180deg, #fffdf8 0%, #ffffff 100%);
}

.pricing-badge-popular {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--brand-1);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.pricing-card-header h3 {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
}

.pricing-card-header p {
  color: var(--text-2);
  font-size: 0.88rem;
  margin: 0 0 1rem;
}

.pricing-price {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-1);
  margin-bottom: 1.2rem;
}

.pricing-price small {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-2);
}

.pricing-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: grid;
  gap: 0.55rem;
}

.pricing-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-1);
}

.pricing-features-list li.feat-included::before {
  content: "✓";
  color: #2f855a;
  font-weight: 800;
}

.pricing-features-list li.feat-excluded {
  color: #9ca3af;
  text-decoration: line-through;
}

.pricing-features-list li.feat-excluded::before {
  content: "✕";
  color: #d1d5db;
  font-weight: 800;
}

.pricing-checkout-panel {
  max-width: 720px;
  margin: 0 auto 3rem;
}

@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ─── Consultation Reports & Print Engine ────────────────────────────────── */
.report-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-soft);
}

.report-toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.report-letterhead-editor {
  background: var(--surface);
  border: 1px dashed var(--line-focus);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

/* Printable Document Canvas */
.report-paper {
  background: #ffffff;
  color: #1a202c;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 2.5rem 3rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  max-width: 920px;
  margin: 0 auto 3rem;
}

.report-letterhead-header {
  border-bottom: 2px solid #2d3748;
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.report-brand-title {
  font-family: var(--font-display, serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a202c;
  line-height: 1.15;
  margin: 0 0 0.25rem;
}

.report-brand-sub {
  font-size: 0.9rem;
  color: #4a5568;
  font-weight: 500;
  margin: 0;
}

.report-contact-info {
  text-align: right;
  font-size: 0.82rem;
  color: #4a5568;
  line-height: 1.45;
}

.report-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
}

.report-meta-item {
  font-size: 0.85rem;
}

.report-meta-label {
  color: #718096;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.report-meta-val {
  color: #1a202c;
  font-weight: 600;
}

.report-block {
  margin-bottom: 2rem;
  page-break-inside: avoid;
}

.report-block-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #2d3748;
  border-bottom: 1.5px solid #cbd5e0;
  padding-bottom: 0.4rem;
  margin: 0 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.report-table th {
  background: #edf2f7;
  color: #2d3748;
  text-align: left;
  padding: 0.55rem 0.75rem;
  font-weight: 600;
  border-bottom: 1.5px solid #cbd5e0;
}

.report-table td {
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  color: #2d3748;
}

.report-table tr:last-child td {
  border-bottom: none;
}

.report-locked-card {
  background: #fffaf0;
  border: 1px dashed #dd6b20;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  color: #7b341e;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.report-signature-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
  page-break-inside: avoid;
}

.report-signature-box {
  width: 220px;
  text-align: center;
  border-top: 1px solid #4a5568;
  padding-top: 0.4rem;
  font-size: 0.85rem;
  color: #4a5568;
}

/* ─── Media Print Formatting Rules ───────────────────────────────────────── */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .bg-orb,
  .sidebar,
  .topbar,
  #navToggle,
  .report-toolbar,
  .report-letterhead-editor,
  .btn,
  .status-badge {
    display: none !important;
  }

  .app {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .main {
    padding: 0 !important;
    margin: 0 !important;
  }

  .report-paper {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }

  .report-block {
    page-break-inside: avoid !important;
  }

  .report-signature-row {
    page-break-inside: avoid !important;
  }
}

/* ─── Advanced Report & Bar Chart Styling ────────────────────────────────── */
.report-toggle-group {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-1);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

.report-toggle-btn {
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-2);
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 150ms ease;
}

.report-toggle-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.report-feature-selector-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.report-feature-col h5 {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  color: var(--text-1);
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.35rem;
}

.report-feature-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.report-chart-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.report-kundli-box {
  background: #fdfbf7;
  border: 1px solid #e2d9cc;
  border-radius: 6px;
  padding: 0.85rem;
  text-align: center;
}

.report-kundli-box h4 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: #4a3b2c;
}

.report-bar-chart-container {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.bar-status-badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 700;
}

.bar-status-cut {
  background: #fed7d7;
  color: #9b2c2c;
}

.bar-status-balanced {
  background: #c6f6d5;
  color: #22543d;
}

.bar-status-extended {
  background: #bee3f8;
  color: #2b6cb0;
}

@media (max-width: 800px) {

  .report-feature-selector-panel,
  .report-chart-duo {
    grid-template-columns: 1fr;
  }
}


/* ─── Astrology Module Navigation Cards ──────────────────────────────────── */
.astro-nav-deck {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.astro-nav-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  background: var(--surface-strong);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 180ms cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
  text-align: left;
}

.astro-nav-card:hover {
  border-color: var(--brand-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.astro-nav-card.active {
  border-color: var(--brand-1);
  background: linear-gradient(135deg, #ffffff 0%, rgba(15, 118, 110, 0.06) 100%);
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.15);
}

.astro-nav-card.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 3px;
  background: var(--brand-1);
  border-radius: 3px 3px 0 0;
}

.astro-nav-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.astro-nav-card-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.astro-nav-card-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #edf2f7;
  color: #4a5568;
  transition: all 150ms ease;
}

.astro-nav-card.active .astro-nav-card-badge {
  background: rgba(15, 118, 110, 0.12);
  color: var(--brand-1);
}

.astro-nav-card-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 0.25rem;
  line-height: 1.25;
}

.astro-nav-card.active .astro-nav-card-title {
  color: var(--brand-1);
}

.astro-nav-card-desc {
  font-size: 0.78rem;
  color: var(--text-2);
  line-height: 1.4;
  margin: 0;
}

/* Responsive Breakpoints for Tablet & Mobile */
@media (max-width: 1024px) {
  .astro-nav-deck {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

@media (max-width: 640px) {
  .astro-nav-deck {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }

  .astro-nav-card {
    padding: 0.85rem 0.95rem;
  }

  .astro-nav-card-title {
    font-size: 0.9rem;
  }

  .astro-nav-card-desc {
    font-size: 0.74rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}


/* ─── Global SaaS Professional Polish & Mobile System ───────────────────── */

/* Top-level App Container */
.app {
  max-width: 1680px;
  margin: 0 auto;
  min-height: 100vh;
}

/* Sidebar & Brand Bar */
.sidebar {
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-soft);
  transition: all 200ms ease;
}

.brand h1 {
  background: linear-gradient(135deg, var(--text-1) 30%, var(--brand-1) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1.5px solid var(--line);
  color: var(--text-1);
  box-shadow: var(--shadow-subtle);
  transition: all 160ms ease;
}

.nav-toggle:hover {
  border-color: var(--brand-1);
  color: var(--brand-1);
  transform: translateY(-1px);
}

.nav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: all 160ms ease;
}

.nav-item:hover {
  background: rgba(15, 118, 110, 0.08);
  color: var(--brand-1);
  border-color: rgba(15, 118, 110, 0.2);
}

.nav-item.active {
  background: var(--brand-gradient);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
  font-weight: 700;
}

/* Glassmorphic Topbar */
.topbar {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  padding: 0.85rem 1.4rem;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Active Context Indicator Pill */
.active-context-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #fffdf8 0%, #fdf5e6 100%);
  border: 1.5px solid #eedbb7;
  font-size: 0.85rem;
  box-shadow: 0 2px 6px rgba(180, 83, 9, 0.06);
  transition: all 160ms ease;
}

.active-context-pill::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2f855a;
  box-shadow: 0 0 0 2px rgba(47, 133, 90, 0.2);
}

.active-context-pill .context-label {
  color: #786343;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.active-context-pill .context-value {
  color: #1f2a2e;
  font-weight: 700;
}

/* Dashboard Hero Banner */
.dashboard-hero-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 1.4rem 1.6rem;
  background: linear-gradient(135deg, #ffffff 0%, #f9fbfb 100%);
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand-1);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-panel);
  margin-bottom: 1.5rem;
}

.hero-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.hero-meta-item {
  display: inline-flex;
  align-items: center;
  background: var(--surface-muted);
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-xs);
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  color: var(--text-2);
}

/* Dashboard 4-Card KPI Grid */
.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dashboard-kpi-grid .dashboard-card {
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-subtle);
  transition: all 180ms ease;
}

.dashboard-kpi-grid .dashboard-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
  border-color: var(--brand-2);
}

/* Universal Tables Touch Scrolling */
.astro-table-wrap,
.table-container {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #ffffff;
  box-shadow: var(--shadow-subtle);
  margin-bottom: 1rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th {
  background: #f8fafc;
  color: var(--text-1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
  padding: 0.75rem 0.95rem;
  border-bottom: 1.5px solid var(--line);
  white-space: nowrap;
}

.data-table td {
  padding: 0.7rem 0.95rem;
  border-bottom: 1px solid var(--line-subtle);
  color: var(--text-1);
  vertical-align: middle;
}

.data-table tbody tr:hover td {
  background: rgba(15, 118, 110, 0.025);
}

.data-table tr.row-active td {
  background: #fdfaf3 !important;
  border-color: #eedbb7;
}

/* Universal Button Refinements */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.45rem;
  padding: 0.5rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 150ms ease;
  line-height: 1;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent-gradient);
  border: none;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(180, 83, 9, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 4px 12px rgba(180, 83, 9, 0.35);
  filter: brightness(1.05);
}

.btn-ghost {
  background: #ffffff;
  border: 1.5px solid var(--line);
  color: var(--text-1);
}

.btn-ghost:hover {
  border-color: var(--brand-1);
  color: var(--brand-1);
  background: #fafffe;
}

/* Form Fields */
.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  min-height: 2.6rem;
  padding: 0.55rem 0.85rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: 0.9rem;
  color: var(--text-1);
  background: #ffffff;
  transition: all 150ms ease;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  outline: none;
  border-color: var(--brand-1);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

/* ─── Mobile & Tablet Responsive Media Queries ───────────────────────────── */
@media (max-width: 1024px) {
  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .app {
    padding: var(--space-2);
    gap: var(--space-2);
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    gap: 0.75rem;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .active-context-pill {
    width: 100%;
    justify-content: flex-start;
    font-size: 0.8rem;
  }

  .dashboard-hero-panel {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.15rem;
  }

  .dashboard-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .form-grid {
    grid-template-columns: 1fr !important;
  }

  .span-2 {
    grid-column: span 1 !important;
  }

  .nav.nav-open {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.4rem;
    padding: 0.75rem 0.85rem 1rem;
  }

  .nav.nav-open .nav-item {
    width: 100%;
    text-align: left;
    justify-content: flex-start;
    padding: 0.75rem 1rem;
    font-size: 0.92rem;
  }
}

@media (max-width: 480px) {
  .dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }

  .person-actions {
    flex-direction: column;
    width: 100%;
  }

  .person-actions .btn {
    width: 100%;
  }
}



/* ─── Executive Rectangular Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.45rem 1rem;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: 6px;
  /* Professional subtle rectangle */
  border: 1px solid var(--line);
  cursor: pointer;
  line-height: 1.2;
  transition: all 140ms cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
}

.btn:active {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-sm {
  min-height: 1.95rem;
  padding: 0.3rem 0.65rem;
  font-size: 0.8rem;
  border-radius: 5px;
}

.btn-primary {
  background: linear-gradient(180deg, #b45309 0%, #9a4406 100%);
  border: 1px solid #7c3503;
  color: #ffffff;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  box-shadow: 0 1px 3px rgba(180, 83, 9, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #c25e10 0%, #a84c07 100%);
  border-color: #8c3b03;
  box-shadow: 0 3px 10px rgba(180, 83, 9, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-ghost {
  background: #ffffff;
  border: 1px solid #dcd5c7;
  color: var(--text-1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-ghost:hover {
  background: #faf8f4;
  border-color: #c9bea9;
  color: var(--brand-1);
}

/* ─── Segmented Chart Style Switcher ─────────────────────────────────────── */
.astro-chart-style-control {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.astro-global-control-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.astro-chart-style-control .form-actions {
  display: inline-flex;
  align-items: center;
  background: #eae5d8;
  padding: 3px;
  border-radius: 7px;
  border: 1px solid #d8d0bf;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.08);
  gap: 2px;
  width: fit-content;
}

.astro-chart-style-button {
  min-width: 7.8rem;
  min-height: 2.1rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 5px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 140ms ease;
  line-height: 1.2;
}

/* Inactive button in segmented track */
.astro-chart-style-button.btn-ghost {
  background: transparent !important;
  color: #645847 !important;
  border-color: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

.astro-chart-style-button.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.5) !important;
  color: #2b2216 !important;
}

/* Active button: elevated crisp white card */
.astro-chart-style-button.btn-primary {
  background: #ffffff !important;
  color: var(--brand-1) !important;
  border: 1px solid #d2c8b5 !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08) !important;
  font-weight: 700 !important;
  text-shadow: none !important;
  transform: none !important;
}


/* ─── Specialized Action Buttons (Show Charts & Show Vastu) ─────────────── */
.person-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 10.5rem;
}

.person-actions-primary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}

.person-actions-secondary {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.btn-action-charts {
  background: linear-gradient(180deg, #0f766e 0%, #0d5f58 100%) !important;
  color: #ffffff !important;
  border: 1px solid #094742 !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  padding: 0.32rem 0.5rem !important;
  border-radius: 5px !important;
  box-shadow: 0 1px 3px rgba(15, 118, 110, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  white-space: nowrap;
}

.btn-action-charts:hover {
  background: linear-gradient(180deg, #148b81 0%, #0f766e 100%) !important;
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.35) !important;
  transform: translateY(-1px);
}

.btn-action-vastu {
  background: linear-gradient(180deg, #b45309 0%, #92400e 100%) !important;
  color: #ffffff !important;
  border: 1px solid #78350f !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  padding: 0.32rem 0.5rem !important;
  border-radius: 5px !important;
  box-shadow: 0 1px 3px rgba(180, 83, 9, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.15) !important;
  white-space: nowrap;
}

.btn-action-vastu:hover {
  background: linear-gradient(180deg, #d97706 0%, #b45309 100%) !important;
  box-shadow: 0 2px 6px rgba(180, 83, 9, 0.35) !important;
  transform: translateY(-1px);
}


/* ─── Workflows Header & Popover Navigation ──────────────────────────────── */
.sidebar {
  position: sticky;
  top: var(--space-3);
  z-index: 30;
  padding: 0;
  border-radius: var(--radius-md);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.sidebar-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 0.8rem 1.2rem;
  position: relative;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.86rem;
  font-weight: 700;
  border-radius: 6px;
  background: #ffffff;
  border: 1.5px solid var(--line);
  color: var(--text-1);
  box-shadow: var(--shadow-subtle);
  cursor: pointer;
  transition: all 160ms ease;
}

.nav-toggle:hover {
  border-color: var(--brand-1);
  color: var(--brand-1);
  transform: translateY(-1px);
}

/* Desktop (min-width: 769px): Floating bounded popover under Workflows button */
@media (min-width: 769px) {
  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 1.2rem;
    width: 290px;
    /* Bounded width: never spans the whole screen */
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 32px rgba(20, 24, 28, 0.14), 0 2px 6px rgba(0, 0, 0, 0.04);
    padding: 0.5rem;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 100;
  }

  .nav.nav-open {
    display: flex;
    animation: navDropIn 160ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes navDropIn {
    from {
      opacity: 0;
      transform: translateY(-6px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Clean left alignment */
    text-align: left;
    /* No more awkward centering */
    width: 100%;
    padding: 0.62rem 0.85rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-1);
    border-radius: 6px;
    border: 1px solid transparent;
    gap: 0.65rem;
    cursor: pointer;
    background: transparent;
    transition: all 140ms ease;
  }

  .nav-item:hover {
    background: #f4f0e6;
    color: var(--brand-1);
  }

  .nav-item.active {
    background: var(--brand-gradient);
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.25);
  }

  .nav-icon {
    font-size: 1.05rem;
    width: 1.35rem;
    display: inline-block;
    text-align: center;
  }
}

/* Mobile & Tablet (< 768px): Expanding accordion, also left-aligned */
@media (max-width: 768px) {
  .nav {
    display: none;
    grid-template-columns: 1fr;
    gap: 0.35rem;
    margin: 0;
    padding: 0.6rem 1rem 1rem;
    border-top: 1px solid var(--line);
  }

  .nav.nav-open {
    display: grid;
  }

  .nav-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    width: 100%;
    padding: 0.7rem 0.95rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid transparent;
    gap: 0.6rem;
  }

  .nav-icon {
    font-size: 1.1rem;
    width: 1.5rem;
    display: inline-block;
  }
}

/* Active workspace indicator in topbar */
.topbar-btn-current {
  outline: 2px solid var(--text-1);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.15) !important;
}

/* ─── Vedic Chakra Visualizations (Kota & Sudarshana) ────────────────────── */
.chakra-header-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ─── Classical Kota & Sudarshana Chakra Styling ──────────────────────────── */
.chakra-svg-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.25rem 0.5rem;
  background: #ffffff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-subtle);
}

.kota-view-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.kota-zone-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.kota-zone-stambha {
  background: #bbf7d0;
  color: #166534;
  border: 1px solid #86efac;
}

.kota-zone-madhya {
  background: #fef08a;
  color: #854d0e;
  border: 1px solid #fde047;
}

.kota-zone-prakaara {
  background: #fecdd3;
  color: #9f1239;
  border: 1px solid #fda4af;
}

.kota-zone-bahya {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}