/* ==========================================================================
   JyotirVed Nakshatra Workstation Stylesheet (Light & Dark Theme)
   ========================================================================== */

.nw-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 0;
  color: var(--ink, #0f172a);
}

/* Header / Hero */
.nw-hero {
  background: var(--paper, #ffffff);
  border: 1.5px solid var(--line, #e2e8f0);
  border-left: 5px solid var(--gold, #d97706);
  border-radius: 14px;
  padding: 18px 22px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

body.dark .nw-hero {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.1);
  border-left-color: #fbbf24;
}

.nw-hero-left h2 {
  margin: 0 0 4px 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--ink, #0f172a);
  display: flex;
  align-items: center;
  gap: 10px;
}

body.dark .nw-hero-left h2 {
  color: #f8fafc;
}

.nw-hero-left p {
  margin: 0;
  font-size: 13px;
  color: var(--muted, #64748b);
  font-weight: 500;
}

body.dark .nw-hero-left p {
  color: #94a3b8;
}

.nw-hero-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.nw-hero-badge {
  background: var(--paper2, #f8fafc);
  border: 1px solid var(--line, #cbd5e1);
  border-radius: 10px;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 110px;
}

body.dark .nw-hero-badge {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.nw-hero-badge .nw-badge-lbl {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--muted, #64748b);
  letter-spacing: 0.5px;
}

body.dark .nw-hero-badge .nw-badge-lbl {
  color: #94a3b8;
}

.nw-hero-badge .nw-badge-val {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink, #0f172a);
}

body.dark .nw-hero-badge .nw-badge-val {
  color: #f8fafc;
}

.nw-hero-badge.is-moon {
  border-color: #38bdf8;
  background: #f0f9ff;
}

body.dark .nw-hero-badge.is-moon {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.12);
}

.nw-hero-badge.is-lagna {
  border-color: #d97706;
  background: #fef3c7;
}

body.dark .nw-hero-badge.is-lagna {
  border-color: rgba(217, 119, 6, 0.4);
  background: rgba(217, 119, 6, 0.14);
}

/* Warnings / Special Banners */
.nw-alert-banner {
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nw-alert-banner.is-gandanta {
  background: #fff1f2;
  border: 1.5px solid #f43f5e;
  color: #be123c;
}

body.dark .nw-alert-banner.is-gandanta {
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fda4af;
}

.nw-alert-banner.is-pushkara {
  background: #f0fdf4;
  border: 1.5px solid #10b981;
  color: #047857;
}

body.dark .nw-alert-banner.is-pushkara {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

/* Tab Navigation */
.nw-tabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 2px solid var(--line, #e2e8f0);
  padding-bottom: 4px;
  flex-wrap: wrap;
}

body.dark .nw-tabs-bar {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.nw-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted, #64748b);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  margin-bottom: -6px;
}

body.dark .nw-tab-btn {
  color: #94a3b8;
}

.nw-tab-btn:hover {
  color: var(--ink, #0f172a);
}

body.dark .nw-tab-btn:hover {
  color: #f8fafc;
}

.nw-tab-btn.is-active {
  color: #2563eb;
  border-bottom-color: #2563eb;
}

body.dark .nw-tab-btn.is-active {
  color: #60a5fa;
  border-bottom-color: #60a5fa;
}

/* Sub-toolbar (Filter & Seed Toggles) */
.nw-sub-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.nw-btn-group {
  display: inline-flex;
  background: var(--paper2, #f1f5f9);
  border: 1px solid var(--line, #cbd5e1);
  border-radius: 8px;
  padding: 2px;
}

body.dark .nw-btn-group {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.1);
}

.nw-group-btn {
  background: transparent;
  border: none;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted, #64748b);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

body.dark .nw-group-btn {
  color: #94a3b8;
}

.nw-group-btn.is-active {
  background: var(--paper, #ffffff);
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

body.dark .nw-group-btn.is-active {
  background: #334155;
  color: #f8fafc;
}

/* 27-Grid / Tara Bala Grid */
.nw-tara-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.nw-tara-card {
  background: var(--paper, #ffffff);
  border: 1.5px solid var(--line, #cbd5e1);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}

body.dark .nw-tara-card {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.08);
}

.nw-tara-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  border-color: #3b82f6;
}

body.dark .nw-tara-card:hover {
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5);
  border-color: #60a5fa;
}

.nw-tara-card.is-shubha {
  border-left: 4px solid #10b981;
}

.nw-tara-card.is-ashubha {
  border-left: 4px solid #ef4444;
}

.nw-tara-card.is-janma {
  border-left: 4px solid #3b82f6;
}

.nw-tara-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.nw-tara-name-box h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink, #0f172a);
}

body.dark .nw-tara-name-box h4 {
  color: #f8fafc;
}

.nw-tara-name-box .nw-tara-sub {
  font-size: 11px;
  color: var(--muted, #64748b);
  margin-top: 2px;
}

body.dark .nw-tara-name-box .nw-tara-sub {
  color: #94a3b8;
}

.nw-tara-badge {
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.nw-tara-badge.shubha {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
}

body.dark .nw-tara-badge.shubha {
  background: rgba(16, 185, 129, 0.18);
  color: #4ade80;
  border-color: rgba(16, 185, 129, 0.4);
}

.nw-tara-badge.ashubha {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
}

body.dark .nw-tara-badge.ashubha {
  background: rgba(239, 68, 68, 0.18);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

.nw-tara-badge.janma {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
}

body.dark .nw-tara-badge.janma {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.4);
}

.nw-tara-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ink, #334155);
  font-weight: 600;
}

body.dark .nw-tara-meta {
  color: #cbd5e1;
}

.nw-special-badge {
  display: inline-block;
  padding: 2px 7px;
  background: #f5f3ff;
  border: 1px solid #c4b5fd;
  color: #6d28d9;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  margin-top: 2px;
}

body.dark .nw-special-badge {
  background: rgba(139, 92, 246, 0.18);
  border-color: rgba(139, 92, 246, 0.4);
  color: #c084fc;
}

.nw-tara-occupants {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.nw-occupant-pill {
  padding: 2px 8px;
  background: var(--paper2, #f1f5f9);
  border: 1px solid var(--line, #cbd5e1);
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink, #0f172a);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

body.dark .nw-occupant-pill {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #f8fafc;
}

.nw-occupant-pill.has-gandanta {
  border-color: #f43f5e;
  background: #fff1f2;
  color: #be123c;
}

body.dark .nw-occupant-pill.has-gandanta {
  background: rgba(244, 63, 94, 0.2);
  color: #fda4af;
}

.nw-occupant-pill.has-pushkara {
  border-color: #d97706;
  background: #fef3c7;
  color: #92400e;
}

body.dark .nw-occupant-pill.has-pushkara {
  background: rgba(217, 119, 6, 0.2);
  color: #fde68a;
}

/* Tables (Planets & Padas) */
.nw-table-wrap {
  overflow-x: auto;
  background: var(--paper, #ffffff);
  border: 1.5px solid var(--line, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

body.dark .nw-table-wrap {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.08);
}

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

.nw-table th {
  background: var(--paper2, #f8fafc);
  padding: 10px 12px;
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted, #475569);
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--line, #e2e8f0);
  white-space: nowrap;
}

body.dark .nw-table th {
  background: #0f172a;
  color: #94a3b8;
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.nw-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line, #e2e8f0);
  color: var(--ink, #1e293b);
  white-space: nowrap;
}

body.dark .nw-table td {
  border-bottom-color: rgba(255, 255, 255, 0.06);
  color: #f1f5f9;
}

.nw-table tr:hover td {
  background: rgba(59, 130, 246, 0.04);
}

body.dark .nw-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Modal / Drawer */
.nw-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.nw-modal {
  background: var(--paper, #ffffff);
  border: 1px solid var(--line, #cbd5e1);
  border-radius: 16px;
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
}

body.dark .nw-modal {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.15);
}

.nw-modal-header {
  padding: 16px 20px;
  border-bottom: 1.5px solid var(--line, #e2e8f0);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

body.dark .nw-modal-header {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.nw-modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--ink, #0f172a);
}

body.dark .nw-modal-header h3 {
  color: #f8fafc;
}

.nw-modal-close {
  background: transparent;
  border: none;
  font-size: 20px;
  font-weight: 700;
  color: var(--muted, #64748b);
  cursor: pointer;
}

.nw-modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 13px;
  line-height: 1.6;
}

.nw-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.nw-modal-info-box {
  background: var(--paper2, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  padding: 10px 14px;
}

body.dark .nw-modal-info-box {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.nw-modal-info-box b {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted, #64748b);
  margin-bottom: 3px;
}

body.dark .nw-modal-info-box b {
  color: #94a3b8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nw-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .nw-modal-grid {
    grid-template-columns: 1fr;
  }
}



.nw-hero-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.nw-lang-toggle, .np-lang-toggle {
  display: inline-flex;
  background: var(--paper2, #f1f5f9);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 8px;
  overflow: hidden;
  padding: 3px;
  gap: 3px;
}

body.dark .nw-lang-toggle, body.dark .np-lang-toggle {
  background: #0f172a;
  border-color: rgba(255, 255, 255, 0.14);
}

.nw-lang-btn, .np-lang-btn {
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--muted, #64748b);
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 11px;
  transition: all 0.15s ease;
  line-height: 1.25;
}

.nw-lang-btn:hover, .np-lang-btn:hover {
  color: var(--ink, #0f172a);
}

body.dark .nw-lang-btn:hover, body.dark .np-lang-btn:hover {
  color: #f8fafc;
}

.nw-lang-btn.active, .np-lang-btn.active {
  background: #ffffff;
  color: #0284c7;
  font-weight: 800;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

body.dark .nw-lang-btn.active, body.dark .np-lang-btn.active {
  background: #1e293b;
  color: #38bdf8;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}


/* Remedies Workstation Styles */
.nw-remedy-personal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.nw-remedy-card {
  background: var(--paper, #ffffff);
  border: 1.5px solid var(--line, #e2e8f0);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
  position: relative;
}

.nw-remedy-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  border-color: #10b981;
}

body.dark .nw-remedy-card {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

body.dark .nw-remedy-card:hover {
  border-color: #34d399;
}

.nw-remedy-card.is-highlight {
  border: 2px solid #10b981;
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.05) 0%, var(--paper, #ffffff) 100%);
}

body.dark .nw-remedy-card.is-highlight {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.12) 0%, #1e293b 100%);
  border-color: #34d399;
}

.nw-remedy-card.is-gandanta {
  border: 2px solid #f43f5e;
  background: linear-gradient(180deg, rgba(244, 63, 94, 0.05) 0%, var(--paper, #ffffff) 100%);
}

body.dark .nw-remedy-card.is-gandanta {
  background: linear-gradient(180deg, rgba(244, 63, 94, 0.12) 0%, #1e293b 100%);
  border-color: #fb7185;
}

.nw-remedy-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  border-bottom: 1px solid var(--line, #e2e8f0);
  padding-bottom: 10px;
}

body.dark .nw-remedy-head {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.nw-remedy-title h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--ink, #0f172a);
}

body.dark .nw-remedy-title h4 {
  color: #f8fafc;
}

.nw-remedy-title .sub {
  font-size: 12px;
  color: var(--muted, #64748b);
  margin-top: 2px;
}

.nw-remedy-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 9999px;
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #7dd3fc;
  white-space: nowrap;
}

.nw-remedy-badge.gandanta {
  background: #fff1f2;
  color: #be123c;
  border-color: #f43f5e;
}

.nw-remedy-badge.naidhana {
  background: #fef3c7;
  color: #92400e;
  border-color: #d97706;
}

.nw-remedy-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.5;
}

.nw-remedy-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nw-remedy-item-lbl {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nw-remedy-item-val {
  color: var(--ink, #1e293b);
}

body.dark .nw-remedy-item-val {
  color: #cbd5e1;
}

.nw-remedy-mantra-box {
  background: var(--paper2, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 8px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 12.5px;
}

body.dark .nw-remedy-mantra-box {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.nw-remedy-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 11.5px;
  padding-top: 8px;
  border-top: 1px dashed var(--line, #e2e8f0);
}

body.dark .nw-remedy-meta-row {
  border-top-color: rgba(255, 255, 255, 0.08);
}


/* Afflicted Nakshatras Alert & Pill Styles */
.nw-alert-banner.is-afflicted {
  background: #fff7ed;
  border: 1.5px solid #f97316;
  color: #c2410c;
  margin-top: 8px;
}

body.dark .nw-alert-banner.is-afflicted {
  background: rgba(249, 115, 22, 0.15);
  border-color: rgba(249, 115, 22, 0.4);
  color: #fdba74;
}

.nw-aff-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: #ffedd5;
  color: #9a3412;
  border: 1px solid #fdba74;
  margin: 2px 3px;
}

body.dark .nw-aff-pill {
  background: rgba(249, 115, 22, 0.2);
  color: #fdba74;
  border-color: rgba(249, 115, 22, 0.4);
}

.nw-sev-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  padding: 2.5px 8px;
  border-radius: 9999px;
  white-space: nowrap;
}

.nw-sev-pill.critical {
  background: #ffe4e6;
  color: #be123c;
  border: 1px solid #f43f5e;
}

.nw-sev-pill.high {
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid #f97316;
}

.nw-sev-pill.moderate {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #eab308;
}

body.dark .nw-sev-pill.critical {
  background: rgba(244, 63, 94, 0.2);
  color: #fda4af;
  border-color: rgba(244, 63, 94, 0.4);
}

body.dark .nw-sev-pill.high {
  background: rgba(249, 115, 22, 0.2);
  color: #fdba74;
  border-color: rgba(249, 115, 22, 0.4);
}

body.dark .nw-sev-pill.moderate {
  background: rgba(234, 179, 8, 0.2);
  color: #fde047;
  border-color: rgba(234, 179, 8, 0.4);
}


.nw-modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(4, 6, 18, 0.8) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px !important;
}


.nw-modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(4, 6, 18, 0.8) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px !important;
}


.nw-modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(4, 6, 18, 0.8) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px !important;
}


.nw-modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(4, 6, 18, 0.8) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px !important;
}


.nw-modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(4, 6, 18, 0.8) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px !important;
}


/* ==========================================================================
   NAKSHATRA COMPLETE REFERENCE GUIDE - THEME MATCHED POSTER DESIGN
   Synchronized with active Sky Blue Theme (and dark/saffron/emerald modes)
   ========================================================================== */
.nw-modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(12, 59, 110, 0.45) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 10px !important;
}

body.dark .nw-modal-overlay {
  background: rgba(4, 6, 18, 0.85) !important;
}

@keyframes nwPosterFadeIn {
  from { opacity: 0; transform: scale(0.97) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Modal Frame - Light Sky Blue Theme by default */
.nw-modal-exact {
  max-width: 1250px !important;
  width: 95vw !important;
  height: auto !important;
  max-height: 94vh !important;
  border-radius: 16px !important;
  padding: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  background: #ffffff !important;
  border: 2px solid #0284c7 !important;
  box-shadow: 0 15px 50px rgba(2, 132, 199, 0.28), 0 0 25px rgba(56, 189, 248, 0.2) !important;
  animation: nwPosterFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, sans-serif !important;
  color: #0f2744 !important;
}

body.dark .nw-modal-exact {
  background: #0b0d1e !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 35px rgba(245, 158, 11, 0.45), 0 25px 75px rgba(0, 0, 0, 0.9) !important;
  color: #f8fafc !important;
}

/* Super Top Title Bar */
.nw-exact-super-bar {
  background: linear-gradient(90deg, #0c3b6e 0%, #0369a1 55%, #0284c7 100%);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.25);
  padding: 5px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: #ffffff;
  flex-shrink: 0;
}

body.dark .nw-exact-super-bar {
  background: rgba(11, 13, 30, 0.96) !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
}

.nw-exact-super-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nw-exact-super-title {
  font-family: 'Cinzel', 'Georgia', serif;
  font-size: 13.5px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 3px rgba(2, 132, 199, 0.5);
  display: flex;
  align-items: center;
  gap: 6px;
}

body.dark .nw-exact-super-title {
  color: #fef08a !important;
  text-shadow: 0 0 10px rgba(254, 240, 138, 0.4) !important;
}

.nw-exact-super-pipe {
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
}

.nw-exact-super-sub {
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.nw-exact-super-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nw-exact-ctrl-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nw-exact-ctrl-btn:hover {
  background: #ffffff;
  color: #0284c7;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
  transform: translateY(-1px);
}

body.dark .nw-exact-ctrl-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(245, 158, 11, 0.6);
}

body.dark .nw-exact-ctrl-btn:hover {
  background: #f59e0b;
  color: #0b0d1e;
  box-shadow: 0 0 10px #f59e0b;
}

/* Main Header Banner - Radiant Sky Blue */
.nw-exact-header {
  position: relative;
  background: linear-gradient(135deg, #0c3b6e 0%, #0369a1 40%, #0284c7 80%, #38bdf8 100%);
  border-bottom: 2px solid #bae6fd;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.16);
}

body.dark .nw-exact-header {
  background: linear-gradient(135deg, #1e1b4b 0%, #2e1065 40%, #0b0d1e 100%) !important;
  border-color: rgba(245, 158, 11, 0.5) !important;
}

.nw-exact-header-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.25;
  pointer-events: none;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.3) 0%, transparent 40%),
    radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
}

.nw-exact-header-left {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Number Medallion */
.nw-exact-num-badge {
  width: 42px;
  height: 42px;
  background: linear-gradient(145deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  border: 2px solid #ffffff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  color: #ffffff;
  box-shadow: 0 3px 12px rgba(245, 158, 11, 0.45), inset 0 2px 4px rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 3px rgba(180, 83, 9, 0.8);
  flex-shrink: 0;
}

body.dark .nw-exact-num-badge {
  background: linear-gradient(145deg, #581c87 0%, #4c1d95 60%, #3b0764 100%);
  border-color: #f59e0b;
}

.nw-exact-name {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.01em;
  text-shadow: 0 2px 6px rgba(2, 132, 199, 0.5);
}

body.dark .nw-exact-name {
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.nw-exact-sanskrit-pill {
  background: #ffffff;
  color: #0284c7;
  padding: 3px 13px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13.5px;
  border: 1.5px solid #bae6fd;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.2);
}

body.dark .nw-exact-sanskrit-pill {
  background: linear-gradient(135deg, #fef08a 0%, #fde047 100%);
  color: #78350f;
  border-color: #f59e0b;
}

.nw-exact-span-pill {
  background: rgba(255, 255, 255, 0.22);
  border: 1.5px solid rgba(255, 255, 255, 0.5);
  color: #ffffff;
  padding: 3px 13px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
}

body.dark .nw-exact-span-pill {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(245, 158, 11, 0.7);
}

.nw-exact-lord-pill {
  background: rgba(12, 59, 110, 0.45);
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  color: #ffffff;
  padding: 3px 13px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

body.dark .nw-exact-lord-pill {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  border-color: #e9d5ff;
  box-shadow: 0 2px 8px rgba(109, 40, 217, 0.35);
}

.nw-exact-header-right {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
}

.nw-exact-zodiac-wheel-svg {
  width: 54px;
  height: 54px;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
  animation: nwSlowRotate 120s linear infinite;
}

@keyframes nwSlowRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Tabs Bar */
.nw-exact-tabs-bar {
  background: #f0f9ff;
  border-bottom: 1.5px solid #bae6fd;
  padding: 5px 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

body.dark .nw-exact-tabs-bar {
  background: rgba(10, 12, 27, 0.85);
  border-color: rgba(245, 158, 11, 0.25);
}

.nw-exact-tab-btn {
  padding: 5px 16px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  border: 1.5px solid transparent;
}

.nw-exact-tab-btn.active {
  background: #ffffff;
  color: #0284c7;
  border-color: #38bdf8;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.18);
}

body.dark .nw-exact-tab-btn.active {
  background: linear-gradient(135deg, #fef08a 0%, #fde047 50%, #eab308 100%);
  color: #0f172a;
  border-color: #facc15;
}

.nw-exact-tab-btn.inactive {
  background: transparent;
  color: #507294;
  font-weight: 700;
}

body.dark .nw-exact-tab-btn.inactive {
  background: rgba(76, 29, 149, 0.35);
  color: #e9d5ff;
  border-color: rgba(192, 132, 252, 0.4);
}

.nw-exact-tab-btn.inactive:hover {
  background: rgba(2, 132, 199, 0.08);
  color: #0284c7;
}

/* Main Content Body - Clean Luminous Sky Tint */
.nw-exact-body {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow-y: auto;
  max-height: calc(94vh - 120px);
  background: #f0f7ff;
}

body.dark .nw-exact-body {
  background: 
    radial-gradient(ellipse at 50% 15%, #181b3d 0%, #0d0f24 55%, #050611 100%),
    radial-gradient(1px 1px at 40px 60px, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 220px 120px, rgba(254,240,138,0.8), transparent);
}

/* Grids */
.nw-exact-grid-top {
  display: grid;
  grid-template-columns: 200px 1.25fr 1.15fr 1.15fr;
  gap: 7px;
  align-items: stretch;
}

.nw-exact-grid-mid {
  display: grid;
  grid-template-columns: 200px 1.25fr 1.15fr 1.15fr;
  gap: 7px;
  align-items: stretch;
}

.nw-exact-grid-bot {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 7px;
  align-items: stretch;
}

@media (max-width: 980px) {
  .nw-exact-grid-top, .nw-exact-grid-mid, .nw-exact-grid-bot {
    grid-template-columns: 1fr;
  }
}

/* Cards */
.nw-exact-card {
  background: #ffffff;
  border: 1.5px solid #bae6fd;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.08);
  display: flex;
  flex-direction: column;
}

body.dark .nw-exact-card {
  background: #0f172a;
  border-color: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35), 0 4px 16px rgba(0, 0, 0, 0.6);
}

/* Headers */
.nw-exact-head {
  padding: 5px 9px;
  font-size: 11.5px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  border-bottom: 1.5px solid #bae6fd;
}

/* Light Theme: Harmonized with Sky (Light) Palette */
.nw-hd-purple  { background: linear-gradient(90deg, #f0f7ff 0%, #e0f2fe 100%); color: #0369a1; border-bottom: 1.5px solid #bae6fd; }
.nw-hd-green   { background: linear-gradient(90deg, #ecfdf5 0%, #d1fae5 100%); color: #047857; border-bottom: 1.5px solid #a7f3d0; }
.nw-hd-red     { background: linear-gradient(90deg, #fff1f2 0%, #ffe4e6 100%); color: #be123c; border-bottom: 1.5px solid #fecdd3; }
.nw-hd-blue    { background: linear-gradient(90deg, #f0f7ff 0%, #e0f2fe 100%); color: #0369a1; border-bottom: 1.5px solid #bae6fd; }
.nw-hd-forest  { background: linear-gradient(90deg, #f0fdf4 0%, #dcfce7 100%); color: #166534; border-bottom: 1.5px solid #bbf7d0; }
.nw-hd-amber   { background: linear-gradient(90deg, #fffbeb 0%, #fef3c7 100%); color: #92400e; border-bottom: 1.5px solid #fde68a; }
.nw-hd-azure   { background: linear-gradient(90deg, #f0f7ff 0%, #e0f2fe 100%); color: #0284c7; border-bottom: 1.5px solid #bae6fd; }
.nw-hd-ocean   { background: linear-gradient(90deg, #f0f7ff 0%, #e0f2fe 100%); color: #0369a1; border-bottom: 1.5px solid #bae6fd; }
.nw-hd-violet  { background: linear-gradient(90deg, #f0f7ff 0%, #e0f2fe 100%); color: #0369a1; border-bottom: 1.5px solid #bae6fd; }
.nw-hd-deep    { background: linear-gradient(90deg, #f0f7ff 0%, #e0f2fe 100%); color: #0c3b6e; border-bottom: 1.5px solid #bae6fd; }
.nw-hd-gold    { background: linear-gradient(90deg, #fffdf5 0%, #fef9c3 100%); color: #854d0e; border-bottom: 1.5px solid #fef08a; }

/* Dark Theme: Vibrant Cosmic Glowing Headers */
body.dark .nw-exact-head {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  border-bottom: none;
}
body.dark .nw-hd-purple  { background: linear-gradient(90deg, #6b21a8 0%, #7c3aed 50%, #9333ea 100%); }
body.dark .nw-hd-green   { background: linear-gradient(90deg, #047857 0%, #059669 50%, #10b981 100%); }
body.dark .nw-hd-red     { background: linear-gradient(90deg, #991b1b 0%, #b91c1c 50%, #dc2626 100%); }
body.dark .nw-hd-blue    { background: linear-gradient(90deg, #1e3a8a 0%, #2563eb 50%, #3b82f6 100%); }
body.dark .nw-hd-forest  { background: linear-gradient(90deg, #065f46 0%, #047857 50%, #059669 100%); }
body.dark .nw-hd-amber   { background: linear-gradient(90deg, #92400e 0%, #b45309 50%, #d97706 100%); }
body.dark .nw-hd-azure   { background: linear-gradient(90deg, #0284c7 0%, #0ea5e9 50%, #38bdf8 100%); }
body.dark .nw-hd-ocean   { background: linear-gradient(90deg, #0369a1 0%, #0284c7 50%, #38bdf8 100%); }
body.dark .nw-hd-violet  { background: linear-gradient(90deg, #581c87 0%, #7c3aed 50%, #9333ea 100%); }
body.dark .nw-hd-deep    { background: linear-gradient(90deg, #4c1d95 0%, #6d28d9 50%, #7c3aed 100%); }
body.dark .nw-hd-gold    { background: linear-gradient(90deg, #b45309 0%, #d97706 50%, #f59e0b 100%); }

/* Card Body Boxes */
.nw-exact-body-box {
  padding: 5px 8px;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  background: #ffffff;
  gap: 2px;
}

body.dark .nw-exact-body-box {
  background: #0f172a;
  color: #f8fafc;
}

/* Rows */
.nw-exact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 5px;
  border-radius: 4px;
  font-size: 11px;
  gap: 8px;
  transition: background 0.15s ease;
}

.nw-exact-row:nth-child(even) {
  background: #f0f9ff;
}

body.dark .nw-exact-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}

.nw-exact-row:hover {
  background: #e0f2fe;
}

body.dark .nw-exact-row:hover {
  background: rgba(255, 255, 255, 0.07);
}

.nw-exact-col-left {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  color: #334155;
  flex-shrink: 0;
  white-space: nowrap;
}

body.dark .nw-exact-col-left {
  color: #cbd5e1;
}

.nw-exact-col-val {
  font-weight: 600;
  color: #0f172a;
  text-align: right;
  word-break: break-word;
  line-height: 1.25;
}

body.dark .nw-exact-col-val {
  color: #ffffff;
}

.nw-zero-sign-red {
  color: #dc2626 !important;
  font-weight: 800 !important;
}

/* Bullet Items */
.nw-exact-bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 11px;
  line-height: 1.34;
  padding: 3px 4px;
  border-radius: 4px;
  color: #1e293b;
}

body.dark .nw-exact-bullet-item {
  color: #e2e8f0;
}

.nw-badge-check-green {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #10b981;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 1px;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.35);
}

.nw-badge-cross-red {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ef4444;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 1px;
  box-shadow: 0 1px 3px rgba(239, 68, 68, 0.35);
}

.nw-badge-check-gold {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #f59e0b;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 1px;
  box-shadow: 0 1px 3px rgba(245, 158, 11, 0.35);
}

/* Avatar Cosmic Artwork Card - Theme Matched */
.nw-exact-avatar-box {
  background: linear-gradient(180deg, #ffffff 0%, #f0f9ff 50%, #e0f2fe 100%);
  border: 1.5px solid #bae6fd;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px;
  height: 100%;
  min-height: 175px;
}

body.dark .nw-exact-avatar-box {
  background: radial-gradient(circle at 50% 35%, #2e1065 0%, #1e1b4b 45%, #0f172a 80%, #030712 100%) !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.4), inset 0 0 15px rgba(245, 158, 11, 0.2) !important;
}

.nw-exact-avatar-svg {
  width: 100%;
  height: 100%;
  min-height: 165px;
  display: block;
}

/* Pada Table */
.nw-pada-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.5px;
}

.nw-pada-th {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 800;
  padding: 3px 5px;
  text-align: center;
  border-bottom: 1.5px solid #bae6fd;
}

body.dark .nw-pada-th {
  background: rgba(2, 132, 199, 0.15);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.3);
}

.nw-pada-td {
  padding: 2.5px 4px;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
  font-weight: 600;
  color: #1e293b;
}

body.dark .nw-pada-td {
  border-color: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
}

.nw-pada-pill-1 { background: #9333ea; color: #fff; width: 17px; height: 17px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 9.5px; }
.nw-pada-pill-2 { background: #0284c7; color: #fff; width: 17px; height: 17px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 9.5px; }
.nw-pada-pill-3 { background: #10b981; color: #fff; width: 17px; height: 17px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 9.5px; }
.nw-pada-pill-4 { background: #ea580c; color: #fff; width: 17px; height: 17px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 9.5px; }

/* Special Timings Box */
.nw-ghati-row-amrit {
  background: #ecfdf5;
  border: 1px solid #10b981;
  border-radius: 5px;
  padding: 3.5px 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

body.dark .nw-ghati-row-amrit {
  background: rgba(16, 185, 129, 0.15);
  border-color: #10b981;
}

.nw-ghati-row-vish {
  background: #fff1f2;
  border: 1px solid #f43f5e;
  border-radius: 5px;
  padding: 3.5px 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}

body.dark .nw-ghati-row-vish {
  background: rgba(244, 63, 94, 0.15);
  border-color: #f43f5e;
}

/* Planetary Sequence Pills */
.nw-seq-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
}

.nw-seq-pill {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0369a1;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

body.dark .nw-seq-pill {
  background: rgba(2, 132, 199, 0.2);
  border-color: rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
}

.nw-seq-arrow {
  color: #0284c7;
  font-size: 9px;
  font-weight: 800;
}

/* Linkages Table */
.nw-linkage-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.5px;
}

.nw-linkage-th {
  background: #f0f9ff;
  color: #0369a1;
  font-weight: 800;
  padding: 3px 4px;
  text-align: center;
  border-bottom: 1.5px solid #bae6fd;
}

body.dark .nw-linkage-th {
  background: rgba(107, 33, 168, 0.2);
  color: #d8b4fe;
  border-color: rgba(192, 132, 252, 0.3);
}

.nw-linkage-td {
  padding: 3.5px 4px;
  text-align: center;
  font-weight: 700;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
}

body.dark .nw-linkage-td {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.05);
}

/* Insights 2-Col Grid */
.nw-insights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 8px;
  align-content: space-around;
  flex: 1;
}

@media (max-width: 700px) {
  .nw-insights-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   NAKSHATRA DETAILED QUALITIES & TRAITS TAB (TAB 1) - THEME REDESIGN
   ========================================================================== */

.nw-qualities-wrapper {
  position: relative;
  padding: 24px 28px 30px 28px;
  background: var(--cream, #f0f7ff);
  min-height: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Background Cosmic Stars */
.nw-qualities-bg-stars {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  background-image: 
    radial-gradient(1.5px 1.5px at 15% 20%, rgba(255, 255, 255, 0.4) 100%, transparent),
    radial-gradient(1.5px 1.5px at 45% 10%, rgba(255, 255, 255, 0.3) 100%, transparent),
    radial-gradient(2px 2px at 75% 15%, rgba(251, 191, 36, 0.5) 100%, transparent),
    radial-gradient(1.5px 1.5px at 85% 35%, rgba(56, 189, 248, 0.4) 100%, transparent),
    radial-gradient(1px 1px at 25% 65%, rgba(255, 255, 255, 0.3) 100%, transparent),
    radial-gradient(1.5px 1.5px at 60% 80%, rgba(255, 255, 255, 0.35) 100%, transparent);
  opacity: 0.6;
}

/* Header Row */
.nw-qualities-header-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
  padding: 16px 22px;
  border-radius: 16px;
  background: var(--paper, #ffffff);
  border: 1px solid var(--line, #bae6fd);
  box-shadow: 0 4px 20px rgba(2, 132, 199, 0.08);
  overflow: hidden;
}

.nw-qualities-header-left {
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1;
  min-width: 280px;
}

.nw-qualities-emblem {
  flex-shrink: 0;
  width: 76px;
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nw-emblem-svg {
  display: block;
  overflow: visible;
  filter: drop-shadow(0 4px 10px rgba(2, 132, 199, 0.2));
}

.nw-qualities-title-wrap {
  flex: 1;
}

.nw-qualities-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(2, 132, 199, 0.1);
  color: var(--gold, #0284c7);
  border: 1px solid rgba(2, 132, 199, 0.25);
  margin-bottom: 6px;
}

.nw-qualities-heading {
  margin: 0 0 5px 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--ink, #0c3b6e);
  letter-spacing: -0.3px;
  line-height: 1.3;
}

.nw-qualities-subtext {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted, #507294);
  line-height: 1.4;
}

/* Language Switch Pill Group */
.nw-qualities-lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border-radius: 30px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  gap: 4px;
  flex-shrink: 0;
}

.nw-lang-switch-btn {
  border: none;
  background: transparent;
  color: #475569;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.nw-lang-switch-btn .nw-lang-code {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.08);
}

.nw-lang-switch-btn.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

.nw-lang-switch-btn.active .nw-lang-code {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* 2-Column Cards Grid */
.nw-qualities-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  align-items: start;
}

.nw-qualities-col {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

@media (max-width: 900px) {
  .nw-qualities-columns {
    grid-template-columns: 1fr;
  }
}

/* Individual Quality Card */
.nw-quality-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-radius: 14px;
  background: var(--paper, #ffffff);
  border: 1px solid var(--line, #bae6fd);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.06);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  min-height: 68px;
  box-sizing: border-box;
}

.nw-quality-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(2, 132, 199, 0.14);
  border-color: #38bdf8;
}

.nw-card-left-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Slanted Trapezoid / Parallelogram Number Badge */
.nw-quality-badge {
  width: 36px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: skewX(-12deg);
  border-radius: 6px;
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.nw-quality-badge span {
  transform: skewX(12deg);
  display: block;
}

.nw-quality-badge.badge-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #1c1917;
}

.nw-quality-badge.badge-purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  color: #ffffff;
}

/* Glowing Icon Box */
.nw-quality-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.nw-quality-icon-box.badge-gold {
  background: #fffbeb;
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #d97706;
}

.nw-quality-icon-box.badge-purple {
  background: #f5f3ff;
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: #7c3aed;
}

/* Card Divider */
.nw-card-divider {
  width: 2px;
  height: 40px;
  border-radius: 1px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #0284c7, #38bdf8);
  opacity: 0.85;
}

/* Card Body & Text */
.nw-quality-body {
  flex: 1;
  min-width: 0;
}

.nw-quality-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink, #0f2744);
  font-weight: 500;
}

.nw-quality-highlight {
  color: var(--gold, #0284c7);
  font-weight: 700;
}

/* Bottom Lotus Ornament */
.nw-qualities-footer-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 26px 0 10px 0;
  margin-top: 10px;
}

.nw-ornament-line {
  width: 70px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #0284c7, transparent);
}

.nw-ornament-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0284c7;
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.6);
}

.nw-ornament-dot.small {
  width: 3.5px;
  height: 3.5px;
  opacity: 0.7;
}

/* ==========================================================================
   THEME VARIATIONS
   ========================================================================== */

/* 1. DARK / MIDNIGHT THEME (Exact match to User's Mockup) */
body.dark .nw-qualities-wrapper {
  background: radial-gradient(circle at 50% 10%, #0c2340 0%, #071322 70%, #040912 100%);
}

body.dark .nw-qualities-header-row {
  background: linear-gradient(135deg, rgba(12, 35, 64, 0.85) 0%, rgba(7, 19, 34, 0.95) 100%);
  border: 1px solid rgba(56, 189, 248, 0.35);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.dark .nw-emblem-svg {
  filter: drop-shadow(0 0 14px rgba(245, 158, 11, 0.45));
}

body.dark .nw-qualities-badge {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

body.dark .nw-qualities-heading {
  background: linear-gradient(135deg, #ffffff 40%, #fde68a 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 24px rgba(253, 230, 138, 0.25);
}

body.dark .nw-qualities-subtext {
  color: #94a3b8;
}

body.dark .nw-qualities-lang-switch {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

body.dark .nw-lang-switch-btn {
  color: #cbd5e1;
}

body.dark .nw-lang-switch-btn .nw-lang-code {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

body.dark .nw-lang-switch-btn.active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #1c1917;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.45);
}

body.dark .nw-lang-switch-btn.active .nw-lang-code {
  background: rgba(0, 0, 0, 0.2);
  color: #1c1917;
}

body.dark .nw-quality-card {
  background: linear-gradient(135deg, rgba(12, 29, 55, 0.88) 0%, rgba(8, 20, 39, 0.96) 100%);
  border: 1px solid rgba(56, 189, 248, 0.32);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body.dark .nw-quality-card:hover {
  border-color: #38bdf8;
  box-shadow: 0 8px 26px rgba(2, 132, 199, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body.dark .nw-card-divider {
  background: linear-gradient(180deg, #f59e0b, #fbbf24);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
}

body.dark .nw-quality-icon-box.badge-gold {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.25);
}

body.dark .nw-quality-icon-box.badge-purple {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #c084fc;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.25);
}

body.dark .nw-quality-text {
  color: #e2e8f0;
}

body.dark .nw-quality-highlight {
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.35);
}

body.dark .nw-ornament-line {
  background: linear-gradient(90deg, transparent, #f59e0b, transparent);
}

body.dark .nw-ornament-dot {
  background: #f59e0b;
  box-shadow: 0 0 10px #f59e0b;
}

/* 2. SKY THEME */
body.theme-sky .nw-qualities-wrapper {
  background: linear-gradient(180deg, #f0f7ff 0%, #e0f2fe 100%);
}

body.theme-sky .nw-qualities-header-row {
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  border-color: #bae6fd;
}

body.theme-sky .nw-quality-card {
  background: #ffffff;
  border-color: #bae6fd;
}

body.theme-sky .nw-card-divider {
  background: linear-gradient(180deg, #0284c7, #38bdf8);
}

body.theme-sky .nw-quality-highlight {
  color: #0284c7;
}

/* 3. SAFFRON THEME */
body.theme-saffron .nw-qualities-wrapper {
  background: linear-gradient(180deg, #f8edda 0%, #edd6b3 100%);
}

body.theme-saffron .nw-qualities-header-row {
  background: linear-gradient(135deg, #fffaf0 0%, #f8edda 100%);
  border-color: #ddbd89;
}

body.theme-saffron .nw-quality-card {
  background: #fffaf0;
  border-color: #ddbd89;
  box-shadow: 0 2px 8px rgba(74, 44, 16, 0.08);
}

body.theme-saffron .nw-card-divider {
  background: linear-gradient(180deg, #d97706, #f59e0b);
}

body.theme-saffron .nw-quality-highlight {
  color: #a85e14;
}

body.theme-saffron .nw-quality-badge.badge-gold {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
}

body.theme-saffron .nw-quality-badge.badge-purple {
  background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
  color: #ffffff;
}

body.theme-saffron .nw-ornament-line {
  background: linear-gradient(90deg, transparent, #d97706, transparent);
}

body.theme-saffron .nw-ornament-dot {
  background: #d97706;
  box-shadow: 0 0 8px #d97706;
}

/* 4. EMERALD THEME */
body.theme-emerald .nw-qualities-wrapper {
  background: linear-gradient(180deg, #e8f3ed 0%, #cbe6db 100%);
}

body.theme-emerald .nw-qualities-header-row {
  background: linear-gradient(135deg, #fbfffc 0%, #e8f3ed 100%);
  border-color: #b7d6c9;
}

body.theme-emerald .nw-quality-card {
  background: #fbfffc;
  border-color: #b7d6c9;
  box-shadow: 0 2px 8px rgba(6, 61, 56, 0.08);
}

body.theme-emerald .nw-card-divider {
  background: linear-gradient(180deg, #059669, #10b981);
}

body.theme-emerald .nw-quality-highlight {
  color: #0b5a50;
}

body.theme-emerald .nw-quality-badge.badge-gold {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
}

body.theme-emerald .nw-quality-badge.badge-purple {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: #ffffff;
}

body.theme-emerald .nw-ornament-line {
  background: linear-gradient(90deg, transparent, #059669, transparent);
}

body.theme-emerald .nw-ornament-dot {
  background: #059669;
  box-shadow: 0 0 8px #059669;
}


/* ==========================================================================
   Natal Nakshatra Highlighting (Janma / Moon, Lagna, Sun)
   ========================================================================== */

.nw-tara-card.is-natal-card {
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.nw-tara-card.is-natal-card:hover {
  transform: translateY(-3px) scale(1.01);
}

/* Moon / Janma Nakshatra */
.nw-tara-card.is-natal-moon {
  border: 2px solid #0284c7 !important;
  border-left: 5px solid #0284c7 !important;
  background: linear-gradient(135deg, rgba(239, 246, 255, 0.96) 0%, rgba(224, 242, 254, 0.65) 100%) !important;
  box-shadow: 0 0 0 1.5px rgba(2, 132, 199, 0.22), 0 4px 14px rgba(2, 132, 199, 0.12) !important;
}

body.dark .nw-tara-card.is-natal-moon {
  background: linear-gradient(135deg, rgba(15, 30, 56, 0.92) 0%, rgba(12, 74, 110, 0.5) 100%) !important;
  border-color: #38bdf8 !important;
  border-left-color: #38bdf8 !important;
  box-shadow: 0 0 0 1.5px rgba(56, 189, 248, 0.3), 0 4px 16px rgba(56, 189, 248, 0.2) !important;
}

/* Lagna Nakshatra */
.nw-tara-card.is-natal-lagna {
  border: 2px solid #d97706 !important;
  border-left: 5px solid #d97706 !important;
  background: linear-gradient(135deg, rgba(254, 252, 232, 0.96) 0%, rgba(254, 243, 199, 0.65) 100%) !important;
  box-shadow: 0 0 0 1.5px rgba(217, 119, 6, 0.22), 0 4px 14px rgba(217, 119, 6, 0.12) !important;
}

body.dark .nw-tara-card.is-natal-lagna {
  background: linear-gradient(135deg, rgba(50, 28, 5, 0.9) 0%, rgba(120, 53, 15, 0.5) 100%) !important;
  border-color: #fbbf24 !important;
  border-left-color: #fbbf24 !important;
  box-shadow: 0 0 0 1.5px rgba(251, 191, 36, 0.3), 0 4px 16px rgba(251, 191, 36, 0.2) !important;
}

/* Sun Nakshatra */
.nw-tara-card.is-natal-sun {
  border: 2px solid #ea580c !important;
  border-left: 5px solid #ea580c !important;
  background: linear-gradient(135deg, rgba(255, 247, 237, 0.96) 0%, rgba(254, 215, 170, 0.6) 100%) !important;
  box-shadow: 0 0 0 1.5px rgba(234, 88, 12, 0.22), 0 4px 14px rgba(234, 88, 12, 0.12) !important;
}

body.dark .nw-tara-card.is-natal-sun {
  background: linear-gradient(135deg, rgba(55, 20, 8, 0.9) 0%, rgba(154, 52, 18, 0.5) 100%) !important;
  border-color: #fb923c !important;
  border-left-color: #fb923c !important;
  box-shadow: 0 0 0 1.5px rgba(251, 146, 60, 0.3), 0 4px 16px rgba(251, 146, 60, 0.2) !important;
}

/* Multi-natal combinations (e.g. Moon + Lagna) */
.nw-tara-card.is-natal-moon.is-natal-lagna {
  border: 2px solid #0284c7 !important;
  border-left: 5px solid #d97706 !important;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.25), 0 0 12px rgba(217, 119, 6, 0.2) !important;
}

.nw-tara-card.is-natal-moon.is-natal-sun {
  border: 2px solid #0284c7 !important;
  border-left: 5px solid #ea580c !important;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.25), 0 0 12px rgba(234, 88, 12, 0.2) !important;
}

/* Tag row inside card */
.nw-natal-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 7px;
  align-items: center;
}

.nw-natal-prominent-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  font-size: 10.5px;
  font-weight: 800;
  border-radius: 9999px;
  letter-spacing: 0.3px;
  line-height: 1.25;
  box-shadow: 0 1.5px 5px rgba(0, 0, 0, 0.12);
  cursor: default;
}

.nw-natal-prominent-tag.is-moon {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  border: 1px solid #7dd3fc;
  box-shadow: 0 2px 7px rgba(2, 132, 199, 0.35);
}

.nw-natal-prominent-tag.is-lagna {
  background: linear-gradient(135deg, #d97706, #b45309);
  color: #ffffff;
  border: 1px solid #fde68a;
  box-shadow: 0 2px 7px rgba(217, 119, 6, 0.35);
}

.nw-natal-prominent-tag.is-sun {
  background: linear-gradient(135deg, #ea580c, #c2410c);
  color: #ffffff;
  border: 1px solid #fed7aa;
  box-shadow: 0 2px 7px rgba(234, 88, 12, 0.35);
}

/* Jump pulse animation */
@keyframes nwNatalPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.75);
  }
  50% {
    transform: scale(1.035);
    box-shadow: 0 0 0 10px rgba(2, 132, 199, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(2, 132, 199, 0);
  }
}

.nw-tara-card.nw-pulse-highlight {
  animation: nwNatalPulse 1.1s ease-in-out 3;
  z-index: 20;
  position: relative;
}



/* ==========================================================================
   Nakshatra Workstation Report Selection System Styles
   ========================================================================== */

/* Report Selection Button in Hero Header */
.nw-report-select-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--paper2, #f1f5f9);
  color: var(--ink, #0f172a);
  border: 1.5px solid var(--line, #cbd5e1);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nw-report-select-btn:hover {
  background: #ffffff;
  border-color: #0284c7;
  color: #0284c7;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(2, 132, 199, 0.2);
}

body.dark .nw-report-select-btn {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.15);
  color: #f1f5f9;
}

body.dark .nw-report-select-btn:hover {
  background: #0f172a;
  border-color: #38bdf8;
  color: #38bdf8;
}

.nw-report-count-pill {
  background: #0284c7;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  line-height: 1.2;
}

/* Role Badges for Native Stars */
.nw-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 9.5px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.nw-role-badge.is-moon { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.nw-role-badge.is-lagna { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.nw-role-badge.is-sun { background: #ffedd5; color: #9a3412; border: 1px solid #fed7aa; }
.nw-role-badge.is-planet { background: #f1f5f9; color: #334155; border: 1px solid #cbd5e1; }
.nw-role-badge.is-afflicted { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

body.dark .nw-native-star-card {
  background: #1e293b !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #f8fafc !important;
}

body.dark .nw-native-star-card div div {
  color: #f8fafc !important;
}
