/* START OF FILE public/bnn/bnn-styles.css */
:root {
    --color-primary: #4A148C;       /* Deep Indigo / Cosmic Purple */
    --color-primary-dark: #2E0057;
    --color-secondary: #CE93D8;     /* Soft Lavender */
    --color-accent: #FFD700;        /* Gold */
    --color-background: #F3E5F5;    /* Light Lavender Background */
    --color-surface: #FFFFFF;
    --color-surface-alt: #FAF0FF;
    --color-border: #CE93D8;
    --color-divider: #EDE7F6;
    --color-text-dark: #1A0033;
    --color-text-medium: #4A148C;
    --color-text-light: #7B1FA2;
    --color-error: #B71C1C;
    --color-error-bg: #FFEBEE;
    --color-jup: #FF8F00;   /* Jupiter - Amber */
    --color-sat: #37474F;   /* Saturn - Dark Grey */
    --color-rah: #880E4F;   /* Rahu - Dark Pink */
    --color-ket: #1B5E20;   /* Ketu - Dark Green */
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
    margin: 0; padding: 0;
    background-color: var(--color-background);
    font-family: 'Segoe UI', Tahoma, sans-serif;
    color: var(--color-text-medium);
}

.astrology-dashboard {
    max-width: 1600px;
    margin: 25px auto;
    padding: 25px;
    background-color: var(--color-surface);
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(74, 20, 140, 0.12);
}

.dashboard-container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    align-items: flex-start;
}

/* ─── Left Panel ─────────────────────────────────────────────────────────── */
.left-panel {
    flex: 1;
    min-width: 380px;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

h1 {
    color: var(--color-primary);
    font-size: 30px;
    margin: 0 0 4px 0;
    text-align: center;
    letter-spacing: 1px;
}

.subtitle {
    text-align: center;
    font-size: 13px;
    color: var(--color-text-light);
    margin: 0 0 20px 0;
    font-style: italic;
}

.birth-chart-form {
    background: var(--color-surface);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(74, 20, 140, 0.1);
    border: 1px solid var(--color-border);
}

.form-row { display: flex; gap: 10px; margin-bottom: 10px; }
.form-section { margin-bottom: 3px; flex: 1; }
.form-section h3 { font-size: 13px; color: var(--color-text-dark); margin: 0 0 4px 0; font-weight: 600; }
.input-group { display: flex; gap: 5px; }
.input-group input, input[type="text"] {
    width: 100%; padding: 8px;
    border: 1px solid var(--color-border);
    border-radius: 4px; font-size: 14px;
    background-color: var(--color-surface-alt);
    color: var(--color-text-dark);
}
.input-group input:focus, input[type="text"]:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(74, 20, 140, 0.15);
}
.coordinates-display {
    margin-top: 6px; font-size: 12px;
    color: var(--color-text-light);
    display: flex; justify-content: space-between;
}

.generate-btn {
    background: var(--color-primary);
    color: white; border: none;
    padding: 10px 20px; border-radius: 4px;
    cursor: pointer; font-size: 14px;
    width: 100%;
    transition: background-color 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.generate-btn:hover:not(:disabled) { background: var(--color-primary-dark); }
.generate-btn:disabled { background-color: #ccc; cursor: not-allowed; opacity: 0.7; }
.generate-btn.small { padding: 8px 15px; font-size: 14px; width: auto; }

/* ─── Loading / Error ────────────────────────────────────────────────────── */
#loadingIndicator, #aiLoading {
    text-align: center; padding: 10px;
    color: var(--color-text-light);
}
#aiLoading .spinner.small { margin-bottom: 5px; }
.spinner {
    border: 4px solid rgba(74, 20, 140, 0.2);
    border-top: 4px solid var(--color-primary);
    border-radius: 50%; width: 30px; height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}
.spinner.small { width: 20px; height: 20px; border-width: 3px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
#errorMessage {
    color: var(--color-error);
    padding: 12px;
    background: var(--color-error-bg);
    border: 1px solid var(--color-error);
    border-radius: 4px;
    margin-top: 15px;
}

/* ─── Chart Container ────────────────────────────────────────────────────── */
.chart-section h2 {
    color: var(--color-primary); font-size: 16px;
    margin: 0 0 10px 0; border-bottom: 1px solid var(--color-border);
    padding-bottom: 6px;
}
.chart-display { text-align: center; }
.chart-display svg { max-width: 100%; height: auto; }

/* ─── Right Panel ────────────────────────────────────────────────────────── */
.right-panel {
    flex: 2.5;
    min-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 88vh;
    overflow-y: auto;
    padding-right: 15px;
}
.right-panel::-webkit-scrollbar { width: 8px; }
.right-panel::-webkit-scrollbar-track { background: var(--color-surface); }
.right-panel::-webkit-scrollbar-thumb {
    background-color: var(--color-primary);
    border-radius: 10px;
    border: 2px solid var(--color-surface);
}

/* ─── AI Analysis Container ──────────────────────────────────────────────── */
.ai-analysis-container {
    background-color: var(--color-surface);
    padding: 20px; border-radius: 8px;
    box-shadow: 0 3px 10px rgba(74, 20, 140, 0.08);
    border: 1px solid var(--color-border);
    display: flex; flex-direction: column; flex-shrink: 0;
}
.ai-analysis-container > h2 {
    color: var(--color-text-dark); font-size: 22px;
    margin: 0 0 18px 0; padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border);
}

/* ─── Language Switch (form-embedded, medical-KP style) ─────────────────── */
.language-switch {
    display: flex;
    border: 1px solid var(--color-primary);
    border-radius: 6px;
    overflow: hidden;
    margin-top: 5px;
}
.lang-btn {
    flex: 1; padding: 8px; border: none;
    background-color: var(--color-surface);
    color: var(--color-primary);
    cursor: pointer; font-size: 14px; font-weight: 500;
    transition: background-color 0.3s, color 0.3s;
}
.lang-btn:first-child { border-right: 1px solid var(--color-primary); }
.lang-btn.active {
    background-color: var(--color-primary);
    color: white; font-weight: 600;
}

/* ─── Collapsible Items ──────────────────────────────────────────────────── */
.ai-collapsible-item {
    background: var(--color-surface);
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(74, 20, 140, 0.08);
    border: 1px solid var(--color-border);
    overflow: hidden;
    margin-bottom: 15px;
}
.ai-collapsible-item:last-child { margin-bottom: 0; }

.collapsible-trigger {
    background-color: var(--color-divider);
    color: var(--color-text-dark);
    cursor: pointer; padding: 14px 18px;
    width: 100%; border: none; text-align: left;
    font-size: 17px; font-weight: 600;
    display: flex; justify-content: space-between; align-items: center;
}
.ai-collapsible-item.active .collapsible-trigger {
    background-color: #EDE7F6;
    color: var(--color-primary);
}
.collapsible-trigger .icon { transition: transform 0.3s ease-out; }
.ai-collapsible-item.active .collapsible-trigger .icon { transform: rotate(180deg); }

.collapsible-content {
    overflow: hidden;
    transition: max-height 0.35s ease-out;
    max-height: 0;
    padding: 0;
}
.ai-collapsible-item.active .collapsible-content { overflow: visible; }

/* AI content padding */
#aiInitialAnalysisContent, .ai-chat-container {
    padding: 15px;
}

.ai-message { margin-bottom: 14px; }
.ai-intro p { color: var(--color-text-light); font-style: italic; }
.ai-error { color: var(--color-error); background: var(--color-error-bg); padding: 10px; border-radius: 4px; }
.ai-question {
    background: var(--color-divider);
    padding: 8px 12px; border-radius: 4px;
    font-style: italic; font-size: 14px;
    color: var(--color-text-dark);
    margin-bottom: 8px;
}

.ai-answer-scroll-wrapper { padding: 15px; }
.collapsible-inner-wrapper { padding: 15px; }

/* AI response message display area */
#aiResponse {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
    margin-bottom: 10px;
    border: 1px solid var(--color-divider);
    border-radius: 6px;
    background-color: var(--color-surface-alt);
    padding: 10px;
}
#aiResponse::-webkit-scrollbar { width: 6px; }
#aiResponse::-webkit-scrollbar-track { background: var(--color-surface-alt); }
#aiResponse::-webkit-scrollbar-thumb {
    background-color: var(--color-primary);
    border-radius: 6px;
}

/* AI content typography */
.ai-content h1, .ai-content h2 { color: var(--color-primary); margin-top: 20px; }
.ai-content h3, .ai-content h4 { color: var(--color-text-dark); margin-top: 14px; }
.ai-content table {
    width: 100%; border-collapse: collapse;
    margin: 12px 0; font-size: 13px;
}
.ai-content table td, .ai-content table th {
    border: 1px solid var(--color-border);
    padding: 7px 10px; text-align: left;
}
.ai-content table th {
    background-color: var(--color-divider);
    font-weight: 600; color: var(--color-text-dark);
}
.ai-content ul, .ai-content ol { margin: 8px 0; padding-left: 22px; }
.ai-content li { margin-bottom: 4px; }
.ai-content strong { color: var(--color-primary-dark); }
.ai-content p { margin: 8px 0; line-height: 1.6; }

/* ─── Q&A Input ──────────────────────────────────────────────────────────── */
.ai-input-container {
    display: flex; gap: 8px; margin-top: 12px;
}
.ai-input-container input {
    flex: 1; padding: 8px 12px;
    border: 1px solid var(--color-border); border-radius: 4px; font-size: 14px;
}
.quick-questions {
    margin-top: 14px;
}
.quick-questions p {
    font-size: 12px; color: var(--color-text-light);
    margin: 0 0 8px 0; font-weight: 600;
}
.quick-questions { display: flex; flex-wrap: wrap; gap: 6px; }
.quick-questions p { width: 100%; }
.quick-question {
    background: var(--color-divider);
    border: 1px solid var(--color-border);
    color: var(--color-primary);
    padding: 5px 10px; border-radius: 20px;
    font-size: 12px; cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}
.quick-question:hover {
    background: var(--color-primary);
    color: white;
}

/* ─── Data Sections ──────────────────────────────────────────────────────── */
.data-section {
    background: var(--color-surface);
    padding: 18px; border-radius: 8px;
    border: 1px solid var(--color-border);
    box-shadow: 0 2px 6px rgba(74, 20, 140, 0.06);
}
.data-section h2 {
    color: var(--color-primary); font-size: 17px;
    margin: 0 0 12px 0; padding-bottom: 8px;
    border-bottom: 1px solid var(--color-divider);
}

.data-display { overflow-x: auto; }
.data-display table {
    width: 100%; border-collapse: collapse;
    font-size: 13px;
}
.data-display table th {
    background-color: var(--color-primary);
    color: white; padding: 8px 10px;
    text-align: left; font-weight: 600;
}
.data-display table td {
    padding: 7px 10px;
    border-bottom: 1px solid var(--color-divider);
    color: var(--color-text-dark);
}
.data-display table tr:last-child td { border-bottom: none; }
.data-display table tr:nth-child(even) td {
    background-color: var(--color-surface-alt);
}
.data-display table tr:hover td { background-color: var(--color-divider); }

/* Planet badge chips */
.planet-badge {
    display: inline-block;
    padding: 2px 8px; border-radius: 12px;
    font-size: 11px; font-weight: 700;
    color: white; margin: 1px;
}
.planet-badge.jup { background-color: var(--color-jup); }
.planet-badge.sat { background-color: var(--color-sat); }
.planet-badge.rah { background-color: var(--color-rah); }
.planet-badge.ket { background-color: var(--color-ket); }

/* BNN Layer cards */
.bnn-layer-card {
    background: var(--color-surface-alt);
    border: 1px solid var(--color-border);
    border-radius: 6px; padding: 12px;
    margin-bottom: 12px;
}
.bnn-layer-card h3 {
    color: var(--color-primary); font-size: 14px;
    margin: 0 0 10px 0;
    border-bottom: 1px solid var(--color-divider);
    padding-bottom: 6px;
}
.bnn-layer-card p {
    font-size: 13px; color: var(--color-text-dark);
    margin: 4px 0; line-height: 1.5;
}
.bnn-layer-card strong { color: var(--color-primary); }

/* Prediction card */
.prediction-card {
    background: linear-gradient(135deg, var(--color-surface-alt), #F8F0FF);
    border: 1px solid var(--color-secondary);
    border-left: 4px solid var(--color-primary);
    border-radius: 6px; padding: 12px;
    margin-bottom: 10px;
}
.prediction-card .combo-label {
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--color-text-light); margin-bottom: 6px;
}
.prediction-card .combo-text {
    font-size: 13px; color: var(--color-text-dark);
    line-height: 1.6;
}

/* Vastu card */
.vastu-card {
    background: linear-gradient(135deg, #FFF9E6, #FFFDE7);
    border: 1px solid var(--color-accent);
    border-radius: 6px; padding: 12px;
    margin-bottom: 10px;
}
.vastu-card .vastu-direction {
    font-size: 12px; font-weight: 700;
    color: #E65100; text-transform: uppercase;
    margin-bottom: 6px;
}
.vastu-card .vastu-action {
    font-size: 13px; color: var(--color-text-dark);
    line-height: 1.6;
}

/* Progress bar for time-to-exit */
.progress-bar-container {
    background: var(--color-divider);
    border-radius: 4px; height: 6px;
    margin-top: 4px; overflow: hidden;
}
.progress-bar {
    height: 100%; border-radius: 4px;
    background: var(--color-primary);
    transition: width 0.5s ease;
}

/* Precise Sky Transit Trigger and Badge styling */
.trigger-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.trigger-badge.peak {
    background-color: #fee2e2;
    color: #ef4444;
    border: 1px solid #fecaca;
}
.trigger-badge.active {
    background-color: #d1fae5;
    color: #10b981;
    border: 1px solid #a7f3d0;
}
.trigger-badge.upcoming {
    background-color: #dbeafe;
    color: #3b82f6;
    border: 1px solid #bfdbfe;
}
.trigger-badge.neutral {
    background-color: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.timing-planet-card {
    border-left: 4px solid var(--color-primary) !important;
}

/* 12-Sign BNN Grid Matrix Styles */
.bnn-grid-table {
    min-width: 1400px;
    border-collapse: collapse;
    margin: 15px 0;
    box-shadow: 0 4px 12px rgba(74, 20, 140, 0.08);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--color-border);
}
.bnn-grid-table th, .bnn-grid-table td {
    padding: 10px;
    text-align: center;
    vertical-align: middle;
    border: 1px solid var(--color-divider);
    font-size: 12px;
}
.bnn-grid-table tr:first-child th {
    background-color: var(--color-primary);
    color: white;
    font-weight: 600;
}
.bnn-grid-table .row-label {
    background-color: var(--color-surface-alt);
    color: var(--color-primary);
    font-weight: 700;
    text-align: left;
    min-width: 150px;
    position: sticky;
    left: 0;
    z-index: 10;
    border-right: 2px solid var(--color-border);
}
.bnn-grid-table .sign-fire {
    background-color: #fee2e2 !important;
    color: #9a3412 !important;
    font-weight: bold;
}
.bnn-grid-table .sign-earth {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
    font-weight: bold;
}
.bnn-grid-table .sign-air {
    background-color: #e0f2fe !important;
    color: #075985 !important;
    font-weight: bold;
}
.bnn-grid-table .sign-water {
    background-color: #e0e7ff !important;
    color: #3730a3 !important;
    font-weight: bold;
}
.bnn-grid-table .planet-badge-mini {
    display: block;
    margin: 3px auto;
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    color: white;
    max-width: 90px;
    text-align: center;
}
.bnn-grid-table .planet-badge-mini.jup { background-color: var(--color-jup); }
.bnn-grid-table .planet-badge-mini.sat { background-color: var(--color-sat); }
.bnn-grid-table .planet-badge-mini.rah { background-color: var(--color-rah); }
.bnn-grid-table .planet-badge-mini.ket { background-color: var(--color-ket); }
.bnn-grid-table .planet-badge-mini.sun { background-color: #f59e0b; }
.bnn-grid-table .planet-badge-mini.mon { background-color: #3b82f6; }
.bnn-grid-table .planet-badge-mini.mar { background-color: #ef4444; }
.bnn-grid-table .planet-badge-mini.mer { background-color: #10b981; }
.bnn-grid-table .planet-badge-mini.ven { background-color: #ec4899; }

.bnn-grid-table .promise-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 700;
    margin: 2px;
    white-space: nowrap;
}
.bnn-grid-table .promise-badge.good {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}
.bnn-grid-table .promise-badge.bad {
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.bnn-grid-table .promise-badge.cautious {
    background-color: #fef3c7;
    color: #d97706;
    border: 1px solid #fde68a;
}
.bnn-grid-table .promise-badge.neutral {
    background-color: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

/* ─── Progressive × Transit Combinations Panel ──────────────────────────── */
.combos-panel-wrap {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 12px;
}
.combos-header {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-divider);
    align-items: center;
}
.combos-legend {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--color-text-light);
    font-size: 11px;
}
.legend-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.legend-dot.promised  { background: var(--color-jup); }
.legend-dot.nopromise { background: #3b82f6; }

.combos-split {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.combos-col {
    flex: 1;
    min-width: 0;
}
.combos-col-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-primary);
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--color-primary);
}
.combos-table-wrap {
    max-height: 320px;
    overflow-y: auto;
    border-radius: 4px;
    border: 1px solid var(--color-divider);
}
.combos-table {
    width: 100%;
    border-collapse: collapse;
}
.combos-table th {
    position: sticky;
    top: 0;
    background: var(--color-primary);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 5px 4px;
    text-align: center;
    white-space: nowrap;
    z-index: 2;
}
.combos-table td {
    padding: 4px 4px;
    border-bottom: 1px solid var(--color-divider);
    text-align: center;
    vertical-align: middle;
}
.combos-table tbody tr:last-child td { border-bottom: none; }
.combos-table tbody tr:hover { background: var(--color-surface-alt); }

/* Planet mini-badges in combos table */
.cpl-badge {
    display: inline-block;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    color: white;
    white-space: nowrap;
}
.cpl-badge.jup { background: var(--color-jup); }
.cpl-badge.sat { background: var(--color-sat); }
.cpl-badge.rah { background: var(--color-rah); }
.cpl-badge.ket { background: var(--color-ket); }
.cpl-badge.sun { background: #f59e0b; }
.cpl-badge.mon { background: #3b82f6; }
.cpl-badge.mar { background: #ef4444; }
.cpl-badge.mer { background: #10b981; }
.cpl-badge.ven { background: #ec4899; }
.cpl-badge.natal-badge { background: #6b7280; }
/* Transit no-promise planet badge (blue) */
.cpl-badge.trans-nopromise { background: #3b82f6; }

/* C / T type badges */
.combo-type-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.5px;
}
.combo-type-c {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}
.combo-type-t {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.combo-sign {
    color: var(--color-text-light);
    font-size: 10px;
    white-space: nowrap;
}

/* Transit rows: promised = planet color bg tint, no-promise = blue tint */
.trans-promised-row { background: rgba(255,143,0,0.06); }
.trans-nopromise-row { background: rgba(59,130,246,0.05); }
.trans-promised-row:hover  { background: rgba(255,143,0,0.12) !important; }
.trans-nopromise-row:hover { background: rgba(59,130,246,0.10) !important; }

/* Responsive */
@media (max-width: 900px) {
    .dashboard-container { flex-direction: column; }
    .left-panel { max-width: 100%; min-width: unset; }
    .right-panel { max-height: none; overflow-y: visible; padding-right: 0; }
    .combos-split { flex-direction: column; }
}

/* ─── Vimshottari Dasha Card ─────────────────────────────────────────────── */
.bnn-dasha-card table { margin-top: 8px; }
.dasha-row-maha td { background: rgba(74,20,140,0.07); font-weight: 600; }
.dasha-row-antar td { background: rgba(74,20,140,0.03); }
.dasha-row-prat td { background: transparent; }
.dasha-period { font-size: 12px; color: var(--color-text-light); white-space: nowrap; }

/* ─── BNN Transit Report Enhanced Styles (.bnn-tx-*) ──────────────────────── */
.bnn-tx-report {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 4px 0;
}

/* ── Summary Panels (non-theme sections) ── */
.bnn-tx-panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(74, 20, 140, 0.07);
    overflow: hidden;
}
.bnn-tx-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(90deg, var(--color-primary) 0%, #7B1FA2 100%);
    color: #fff;
}
.bnn-tx-panel-body {
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--color-text-dark);
}
.bnn-tx-panel-body p { margin: 6px 0; }
.bnn-tx-panel-body h3, .bnn-tx-panel-body h4 {
    color: var(--color-primary);
    margin: 12px 0 6px;
}
.bnn-tx-panel-body ul { padding-left: 20px; margin: 6px 0; }
.bnn-tx-panel-body li { margin-bottom: 4px; }
.bnn-tx-panel-body strong { color: var(--color-primary-dark); }
.bnn-tx-panel-body table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 10px 0; }
.bnn-tx-panel-body table th {
    background: var(--color-primary); color: #fff;
    padding: 7px 10px; text-align: left;
}
.bnn-tx-panel-body table td {
    padding: 7px 10px;
    border-bottom: 1px solid var(--color-divider);
    color: var(--color-text-dark);
}

/* ── Theme Cards ── */
.bnn-tx-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    box-shadow: 0 3px 12px rgba(74, 20, 140, 0.09);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}
.bnn-tx-card:hover {
    box-shadow: 0 6px 20px rgba(74, 20, 140, 0.14);
}
.bnn-tx-card-plain .bnn-tx-card-header {
    background: linear-gradient(90deg, #6a1b9a 0%, #8e24aa 100%);
}

.bnn-tx-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #6a1b9a 100%);
    color: #fff;
    flex-wrap: wrap;
}
.bnn-tx-icon {
    font-size: 20px;
    line-height: 1;
}
.bnn-tx-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.3px;
    flex: 1;
}
.bnn-tx-panel-header .bnn-tx-title { font-size: 15px; }

/* ── Probability Badges ── */
.bnn-tx-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    white-space: nowrap;
}
.bnn-tx-badge.tier-veryhigh {
    background: #fee2e2; color: #991b1b; border: 1px solid #fecaca;
}
.bnn-tx-badge.tier-high {
    background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa;
}
.bnn-tx-badge.tier-medium {
    background: #fef9c3; color: #854d0e; border: 1px solid #fef08a;
}
.bnn-tx-badge.tier-moderate {
    background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe;
}
.bnn-tx-badge.tier-low {
    background: #f3f4f6; color: #6b7280; border: 1px solid #d1d5db;
}
/* In dark header context, override badge colors for inline display */
.bnn-tx-card-header .bnn-tx-badge.tier-veryhigh { background: rgba(254,226,226,0.9); }
.bnn-tx-card-header .bnn-tx-badge.tier-high     { background: rgba(255,237,213,0.9); }
.bnn-tx-card-header .bnn-tx-badge.tier-medium   { background: rgba(254,249,195,0.9); }
.bnn-tx-card-header .bnn-tx-badge.tier-moderate { background: rgba(219,234,254,0.9); }
.bnn-tx-card-header .bnn-tx-badge.tier-low      { background: rgba(243,244,246,0.9); }

/* ── Card Body ── */
.bnn-tx-card-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── Score Bars ── */
.bnn-tx-scores-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.bnn-tx-score-block {
    flex: 1;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.bnn-tx-score-block label {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.bnn-tx-bar-track {
    height: 8px;
    background: var(--color-divider);
    border-radius: 4px;
    overflow: hidden;
}
.bnn-tx-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.bnn-tx-bar-fill.tier-veryhigh { background: linear-gradient(90deg, #ef4444, #b91c1c); }
.bnn-tx-bar-fill.tier-high     { background: linear-gradient(90deg, #f97316, #c2410c); }
.bnn-tx-bar-fill.tier-medium   { background: linear-gradient(90deg, #eab308, #854d0e); }
.bnn-tx-bar-fill.tier-moderate { background: linear-gradient(90deg, #3b82f6, #1d4ed8); }
.bnn-tx-bar-fill.tier-low      { background: linear-gradient(90deg, #9ca3af, #6b7280); }
.bnn-tx-bar-fill.tier-confidence { background: linear-gradient(90deg, var(--color-secondary), var(--color-primary)); }
.bnn-tx-score-val {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-primary-dark);
    text-align: right;
}

/* ── Meta-row group ── */
.bnn-tx-meta-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* ── Inline Key-Value Rows ── */
.bnn-tx-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 13px;
}
.bnn-tx-row-label {
    font-weight: 600;
    color: var(--color-text-medium);
    min-width: 130px;
}
.bnn-tx-window {
    font-size: 13px;
    font-weight: 600;
    color: #0369a1;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    padding: 3px 10px;
    border-radius: 12px;
}
.bnn-tx-alignment {
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
}
.bnn-tx-alignment.align-strong   { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.bnn-tx-alignment.align-moderate { background: #fef9c3; color: #854d0e; border: 1px solid #fef08a; }
.bnn-tx-alignment.align-weak     { background: #f3f4f6; color: #6b7280; border: 1px solid #d1d5db; }

/* ── Sub-section Headers ── */
.bnn-tx-section {
    background: var(--color-surface-alt);
    border: 1px solid var(--color-divider);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.bnn-tx-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.bnn-tx-conv-score {
    background: var(--color-primary);
    color: #fff;
    border-radius: 10px;
    padding: 1px 8px;
    font-size: 11px;
}

/* ── Convergence Pills ── */
.bnn-tx-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.bnn-tx-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 10px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.bnn-tx-pill.pill-ok  { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.bnn-tx-pill.pill-off { background: #f3f4f6; color: #9ca3af; border: 1px solid #d1d5db; }

/* ── Driver Rows ── */
.bnn-tx-driver-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 4px 0;
    border-bottom: 1px solid var(--color-divider);
}
.bnn-tx-driver-row:last-child { border-bottom: none; }
.bnn-tx-driver-rank {
    min-width: 20px;
    height: 20px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}
.bnn-tx-driver-name {
    flex: 1;
    color: var(--color-text-dark);
}
.bnn-tx-driver-chip {
    font-size: 11px;
    font-weight: 700;
    background: var(--color-divider);
    color: var(--color-primary-dark);
    border-radius: 10px;
    padding: 2px 8px;
    white-space: nowrap;
}
.bnn-tx-none { font-size: 12px; color: var(--color-text-light); font-style: italic; margin: 0; }

/* ── Why Now Timeline ── */
.bnn-tx-timeline {
    list-style: none;
    padding: 0; margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.bnn-tx-timeline li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: var(--color-text-dark);
    line-height: 1.5;
}
.bnn-tx-tl-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent);
    border: 2px solid var(--color-primary);
    flex-shrink: 0;
    margin-top: 4px;
}

/* ── Dasha Note Callout ── */
.bnn-tx-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 13px;
    color: #92400e;
    line-height: 1.5;
}
.bnn-tx-note-icon { font-size: 16px; flex-shrink: 0; }

/* ── Narrative prose ── */
.bnn-tx-narrative {
    font-size: 14px;
    line-height: 1.7;
    color: var(--color-text-dark);
    border-top: 1px solid var(--color-divider);
    padding-top: 10px;
    margin-top: 4px;
}
.bnn-tx-narrative p { margin: 6px 0; }
.bnn-tx-narrative strong { color: var(--color-primary-dark); }

/* ── Mobile Responsive ── */
@media (max-width: 600px) {
    .bnn-tx-scores-row { flex-direction: column; gap: 10px; }
    .bnn-tx-card-header { padding: 10px 12px; }
    .bnn-tx-card-body { padding: 10px 12px; }
    .bnn-tx-panel-body { padding: 10px 12px; }
    .bnn-tx-row-label { min-width: unset; width: 100%; }
    .bnn-tx-row { flex-direction: column; align-items: flex-start; }
    .bnn-tx-badge { font-size: 10px; }
    .bnn-tx-title { font-size: 14px; }
}

/* ── Sade Sati Alert Banner ── */
.bnn-sade-sati-alert {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    border: 2px solid #ef5350;
    border-left: 6px solid #c62828;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    color: #b71c1c;
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
}
.bnn-sade-sati-alert .alert-icon {
    font-size: 28px;
    animation: alert-pulse 1.8s infinite;
}
.bnn-sade-sati-alert .alert-details h3 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 700;
}
.bnn-sade-sati-alert .alert-details p {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    opacity: 0.9;
}
@keyframes alert-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* ── Trikona Badges ── */
.trikona-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: capitalize;
    border: 1px solid transparent;
}
.trikona-badge.trikona-dharma {
    background-color: #fff7ed;
    color: #ea580c;
    border-color: #ffedd5;
}
.trikona-badge.trikona-artha {
    background-color: #f0fdf4;
    color: #16a34a;
    border-color: #dcfce7;
}
.trikona-badge.trikona-kama {
    background-color: #f0f9ff;
    color: #0284c7;
    border-color: #e0f2fe;
}
.trikona-badge.trikona-moksha {
    background-color: #faf5ff;
    color: #7c3aed;
    border-color: #f3e8ff;
}

/* ── Transit Meetings Table ── */
.transit-meetings-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 13px;
}
.transit-meetings-table th, .transit-meetings-table td {
    padding: 8px 10px;
    border: 1px solid var(--color-divider);
    text-align: left;
}
.transit-meetings-table th {
    background-color: var(--color-primary);
    color: white;
    font-weight: 600;
}
.transit-meetings-table tr:nth-child(even) {
    background-color: var(--color-surface-alt);
}
.transit-meetings-table tr:hover {
    background-color: var(--color-divider);
}
.meeting-severity-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}
.meeting-severity-badge.critical {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}
.meeting-severity-badge.high {
    background-color: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffe0b2;
}
.meeting-severity-badge.medium {
    background-color: #f1f8e9;
    color: #558b2f;
    border: 1px solid #dcedc8;
}
.meeting-severity-badge.low {
    background-color: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

/* ── Degree-Following and Conjunction Cards ── */
.degree-following-wrap {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.degree-following-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.degree-following-card h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: var(--color-primary);
    border-bottom: 1px solid var(--color-divider);
    padding-bottom: 6px;
}
.degree-following-card .axis-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}
.degree-following-card .axis-col h4 {
    margin: 0 0 6px 0;
    font-size: 12px;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.degree-following-card .planets-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.super-conjunct-warn {
    margin-top: 10px;
    background-color: #fffde7;
    border: 1px solid #fff59d;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    color: #f57f17;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ── Active Transit Predictions Panel (§9 BNN Meetings) ── */
.bnn-tx-meetings-panel {
    border-left: 4px solid #1565c0;
    background: linear-gradient(135deg, #e3f2fd 0%, #f8fbff 100%);
}
.bnn-tx-meetings-panel .bnn-tx-panel-header {
    background: linear-gradient(135deg, #1565c0, #1976d2);
    color: white;
    border-radius: 8px 8px 0 0;
}
.bnn-tx-meetings-panel .bnn-tx-panel-header .bnn-tx-title {
    color: white;
}
.bnn-tx-meetings-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.bnn-tx-meeting-row {
    display: flex;
    flex-direction: column;
    gap: 3px;
    background: white;
    border: 1px solid #bbdefb;
    border-radius: 6px;
    padding: 10px 14px;
    transition: box-shadow 0.2s;
}
.bnn-tx-meeting-row:hover {
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.12);
}
.bnn-tx-meeting-meta {
    font-size: 11px;
    font-weight: 700;
    color: #1565c0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.bnn-tx-meeting-text {
    font-size: 13px;
    color: var(--color-text-primary);
    line-height: 1.5;
}

/* END OF FILE public/bnn/bnn-styles.css */
