:root {
    --bg-color: #0f172a;
    --panel-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #0ea5e9;
    --success-color: #22c55e;
    --glass-border: 1px solid rgba(255, 255, 255, 0.1);
    --font-family: 'Inter', system-ui, sans-serif;
    --universe-bg: #0b1120;
    --sidebar-bg: rgba(30, 41, 59, 0.7);
}

/* Light Theme Text Colors - High Contrast */
[data-bs-theme="light"] {
    --text-primary: #0f172a;
    /* Solid darkest slate */
    --text-secondary: #475569;
    /* Solid medium slate */
    --bg-color: #ffffff;
    /* Pure white */
    --universe-bg: #ffffff;
    /* Pure white for max brightness */
    --panel-bg: #ffffff;
    --accent-color: #0070f3;
    /* Brighter Electric Blue */
    --bs-body-bg: #ffffff;
    --glass-border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Light Theme High Contrast Overrides for Bootstrap Utilities */
[data-bs-theme="light"] .text-warning {
    color: #d97706 !important;
    /* Amber-600 instead of Yellow */
}

[data-bs-theme="light"] .text-info {
    color: #0891b2 !important;
    /* Cyan-600 instead of bright Cyan */
}

[data-bs-theme="light"] .text-danger {
    color: #e11d48 !important;
    /* Rose-600, slightly darker/more visible */
}

[data-bs-theme="light"] .text-success {
    color: #059669 !important;
    /* Emerald-600 */
}

[data-bs-theme="light"] .badge.bg-secondary.opacity-50 {
    opacity: 1 !important;
    background-color: #e2e8f0 !important;
    /* Slate-200 */
    color: #475569 !important;
    /* Slate-600 */
}

[data-bs-theme="light"] .badge.text-secondary {
    color: #475569 !important;
}

.text-headings {
    color: var(--text-primary);
    font-weight: 700;
}

.bg-panel {
    background: var(--panel-bg);
}

/* Light Theme overrides for Panel Shadow/Border */
[data-bs-theme="light"] .bg-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    /* Clean shadow */
}

[data-bs-theme="light"] .story-text {
    color: #334155 !important;
    /* Slightly darker slate for reading */
}

[data-bs-theme="light"] .glass-navbar {
    background: rgba(255, 255, 255, 0.85) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
}

[data-bs-theme="light"] .glass-navbar .navbar-nav {
    background: rgba(241, 245, 249, 0.8);
    /* Slate-100 */
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

[data-bs-theme="light"] .glass-navbar .nav-link {
    color: #64748b !important;
}

[data-bs-theme="light"] .glass-navbar .nav-link:hover {
    color: #0f172a !important;
    background: rgba(0, 0, 0, 0.05);
}

[data-bs-theme="light"] .glass-navbar .nav-link.active {
    color: #0284c7 !important;
    background: rgba(2, 132, 199, 0.1);
}

body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
}

/* Navbar Navigation Buttons */
.navbar .nav-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.navbar .nav-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.navbar .nav-btn.active {
    color: var(--accent-color);
    background: rgba(56, 189, 248, 0.1);
}

/* Main */
main {
    flex: 1;
    position: relative;
    overflow: hidden;
    padding-top: 70px;
    /* Space for fixed navbar */
}

/* --- BEAUTIFUL CENTERED NAVBAR --- */
.glass-navbar {
    background: rgba(15, 23, 42, 0.65) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    height: 70px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.glass-navbar .navbar-brand {
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

/* Absolute Center for Nav Links on Desktop */
@media (min-width: 992px) {
    .glass-navbar .navbar-collapse {
        position: relative;
    }

    .glass-navbar .navbar-nav {
        position: relative;
        /* Reset from absolute */
        left: auto;
        transform: none;
        background: transparent;
        /* Remove pill bg */
        padding: 0;
        border: none;
        display: flex;
        gap: 1rem;
    }
}

.glass-navbar .nav-link {
    color: #475569 !important;
    /* Slate-600, darker/more visible */
    font-size: 0.85rem;
    font-weight: 600;
    /* Bolder */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 1.2rem !important;
    border-radius: 20px;
    transition: all 0.2s;
}

.glass-navbar .nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.05);
}

.glass-navbar .nav-link.active {
    color: #fff !important;
    /* Blue text */
    background: rgba(14, 165, 233, 0.2);
    /* Soft blue bg */
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.1);
}

section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding: 1rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    opacity: 1;
    pointer-events: all;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

section.active {
    opacity: 1;
}

/* Specific Section Heights */
#section-a {
    min-height: 100vh;
    height: auto;
    padding: 0;
    overflow: visible;
}

#section-b,
#section-c {
    height: auto;
    padding: 4rem 1rem;
}

#section-b,
#section-c {
    height: auto;
    padding: 4rem 1rem;
    background: var(--universe-bg);
    /* Enforce light bg */
}

/* Section B specific - scrollable process view */
#section-b {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #475569 #1e293b;
}

#section-b::-webkit-scrollbar {
    width: 8px;
}

#section-b::-webkit-scrollbar-track {
    background: #1e293b;
}

#section-b::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

/* Light Theme Scrollbar */
[data-bs-theme="light"] ::-webkit-scrollbar-track {
    background: #f1f5f9;
}

[data-bs-theme="light"] ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border: 1px solid #fff;
}

[data-bs-theme="light"] ::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Universe */
.controls-bar {
    display: flex;
    gap: 2rem;
    align-items: center;
    height: 50px;
    background: var(--panel-bg);
    padding: 0 1rem;
    border-bottom: var(--glass-border);
}

.control-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.control-group label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
}

select {
    background: var(--sidebar-bg);
    border: var(--glass-border);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 4px;
}

#universe-container {
    flex: 1;
    position: relative;
    background: var(--universe-bg);
    overflow: hidden;
    min-height: 600px;
    /* Safeguard minimum */
    width: 100%;
}

/* Dots - Premium styling with smooth animations */
.dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 2px;
    background-color: var(--accent-color);
    transition: top 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        left 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        background-color 0.3s ease,
        transform 0.2s ease,
        box-shadow 0.3s ease;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

/* Z-Index Hierarchy: DotHover (1000) < Tooltip (2000) < Modal (5000) */
.dot:hover {
    z-index: 1000 !important;
    transform: scale(1.8);
    background-color: #ffffff !important;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.9),
        0 0 20px rgba(56, 189, 248, 0.5);
}

/* Labels */
.axis-label,
.group-label {
    position: absolute;
    pointer-events: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    z-index: 5;
}

.group-label {
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

/* Tooltip - Uses Bootstrap card styling */
#tooltip {
    position: fixed;
    pointer-events: none;
    z-index: 2000;
    width: 320px;
    opacity: 0;
    transition: opacity 0.15s ease;
    font-size: 0.85rem;
}

#tooltip.card {
    border-color: var(--accent-color);
    background: var(--bs-body-bg, #0f172a);
}

#tooltip .card-header {
    background: rgba(56, 189, 248, 0.1);
    border-bottom-color: rgba(56, 189, 248, 0.2);
}

#tooltip .card-footer {
    background: rgba(0, 0, 0, 0.3);
}

#tt-sql {
    margin: 0;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.75rem;
    color: #a5b4fc;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 300px;
    /* Allow more height */
    overflow-y: auto;
    /* Scroll if truly massive */
    opacity: 0.9;
    /* Removed line-clamp to show full query */
}

/* Modal - Custom Overlay with Bootstrap Modal Content */
#modal-overlay,
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#modal-overlay.active,
.modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

.modal-overlay .modal-dialog {
    max-height: 90vh;
    overflow: visible;
}

.modal-overlay .modal-content {
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.modal-overlay .modal-header {
    background: var(--bs-body-bg, #0f172a);
    flex-shrink: 0;
}

.modal-overlay .modal-body {
    overflow-y: auto;
    max-height: calc(85vh - 120px);
    scrollbar-width: thin;
    scrollbar-color: #475569 #1e293b;
}

.modal-overlay .modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-overlay .modal-body::-webkit-scrollbar-track {
    background: #1e293b;
    border-radius: 4px;
}

.modal-overlay .modal-body::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

.modal-overlay .modal-body::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

.metadata-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.meta-item label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
}

.meta-item div {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.sql-block {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #a5b4fc;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 350px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #475569 transparent;
}

.sql-block::-webkit-scrollbar {
    width: 6px;
}

.sql-block::-webkit-scrollbar-track {
    background: transparent;
}

.sql-block::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 3px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Section B & C (Retained Minimal) */
.stage-card {
    background: var(--panel-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    background: var(--panel-bg);
    /* Ensure adaptation */
}

[data-bs-theme="light"] .stage-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stage-header {
    padding: 1rem;
    display: flex;
    gap: 1rem;
    cursor: pointer;
    align-items: center;
}

.stage-content {
    padding: 0 1rem;
    height: 0;
    overflow: hidden;
}

.stage-card.expanded .stage-content {
    height: auto;
    padding-bottom: 1rem;
}

.accordion-table-item {
    /* Updated from .accordion-item */
    padding: 0;
    /* Let inner content handle padding */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* Dark theme default */
    cursor: pointer;
    transition: background 0.2s;
}

.accordion-table-item.active {
    background: rgba(56, 189, 248, 0.1);
    border-left: 3px solid var(--accent-color);
}

[data-bs-theme="light"] .accordion-table-item {
    border-bottom: 1px solid #e2e8f0;
}

[data-bs-theme="light"] .accordion-table-item.active {
    background: #f0f9ff;
    border-left-color: var(--accent-color);
}

[data-bs-theme="light"] .accordion-table-item:hover:not(.active) {
    background: #f8fafc;
}

.schema-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.schema-table th {
    text-align: left;
    padding: 8px;
    border-bottom: 1px solid #334155;
    color: #94a3b8;
}

.schema-table td {
    padding: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Process Pipeline Styles */
.pipeline-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 1rem 2rem;
    min-height: min-content;
}

.pipeline-visual {
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow-x: auto;
    overflow-y: visible;
    padding: 10px 5px 20px 5px;
}

.pipeline-node {
    background: var(--panel-bg);
    border: 2px solid rgba(148, 163, 184, 0.3);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    min-width: 160px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.pipeline-node:hover {
    border-color: var(--accent-color);
    background: rgba(56, 189, 248, 0.1);
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.2);
}

.pipeline-node.active {
    border: 2px solid var(--accent-color);
    background: rgba(56, 189, 248, 0.15);
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.3);
    transform: translateY(-2px);
}

.node-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.node-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

/* Light Theme Pipeline Overrides */
[data-bs-theme="light"] .pipeline-node {
    background: #ffffff;
    border: 2px solid #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-bs-theme="light"] .pipeline-node:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
}

[data-bs-theme="light"] .pipeline-node.active {
    background: #f0f9ff;
    border: 2px solid var(--accent-color);
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.2);
}

[data-bs-theme="light"] .pipeline-arrow {
    color: #cbd5e1;
}

[data-bs-theme="light"] .pipeline-details {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* Accordion Light Theme */
[data-bs-theme="light"] .accordion-item {
    border-bottom: 1px solid #e2e8f0;
}

[data-bs-theme="light"] .accordion-item.selected {
    background: #f0f9ff;
    border-left-color: var(--accent-color);
}

[data-bs-theme="light"] .schema-table th {
    border-bottom: 1px solid #cbd5e1;
    color: #475569;
}

[data-bs-theme="light"] .schema-table td {
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
}

.node-tags {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.pipeline-arrow {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.2);
    padding: 0 0.5rem;
}

/* Process Details Panel */
.pipeline-details {
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.detail-title {
    margin: 0 0 1.5rem 0;
    font-size: 1.4rem;
    color: var(--accent-color);
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Data Story Cards */
.story-card {
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.story-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.5) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* D3 Chart Background */
.d3-chart-bg {
    background: rgba(15, 23, 42, 0.3);
}

[data-bs-theme="light"] .d3-chart-bg {
    background: rgba(0, 0, 0, 0.05);
}

/* Glass Card (Adaptive) */
.glass-card {
    background: rgba(30, 41, 59, 0.4);
    /* Dark default */
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.code-block-bg {
    background: rgba(0, 0, 0, 0.3);
}

[data-bs-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

[data-bs-theme="light"] .code-block-bg {
    background: rgba(0, 0, 0, 0.05);
    /* Light gray tint */
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.detail-block label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.detail-block p {
    margin: 0;
    font-size: 1rem;
    color: #e2e8f0;
    line-height: 1.5;
}

.detail-block.input p {
    color: #facc15;
}

/* Yellow for Input */
.detail-block.output p {
    color: #4ade80;
}

/* Green for Output */

.detail-block.why {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--accent-color);
}

.detail-artifact {
    display: inline-flex;
    align-items: center;
    background: #1e293b;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: Consolas, monospace;
    font-size: 0.85rem;
}

.artifact-icon {
    margin-right: 8px;
}

.artifact-name {
    color: #a5b4fc;
}

.placeholder-text {
    text-align: center;
    color: #64748b;
    font-style: italic;
    padding: 2rem;
}

/* D3 Tooltip for Pipeline Charts */
.d3-tooltip {
    position: absolute;
    text-align: center;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    background: rgba(15, 23, 42, 0.95);
    color: #f1f5f9;
    border: 1px solid #38bdf8;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 1000;
}


/* --- Section C: Data Explorer Layout (Ref Check) --- */
.middle-layer-layout {
    display: flex;
    height: 100%;
    gap: 0;
    /* Flush split */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    background: #0f172a;
}

/* Sidebar */
.explorer-sidebar {
    width: 360px;
    background: #1e293b;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
}

.explorer-header {
    padding: 1rem;
    font-weight: 600;
    color: #f8fafc;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dataset-category {
    padding: 0.75rem 1rem;
    color: #38bdf8;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(56, 189, 248, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dataset-item {
    padding: 0.75rem 1rem;
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.dataset-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.dataset-item.active {
    background: rgba(56, 189, 248, 0.1);
    border-left-color: #38bdf8;
}

.ds-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e2e8f0;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.ds-meta {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-left: 24px;
    /* Align with text */
}

/* Details Panel */
.schema-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    /* Reset */
    overflow-y: auto;
    background: #0b1120;
}

.table-detail-header {
    padding: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.table-title-row h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #f8fafc;
}

.type-badge {
    background: #475569;
    color: #94a3b8;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.pk-box {
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-top: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.pk-label {
    color: #38bdf8;
    font-weight: 700;
    font-size: 0.8rem;
}

.pk-val {
    color: #e2e8f0;
    font-family: monospace;
}

.confidence-badge {
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 4px;
}

/* Schema Table */
.schema-grid-container {
    padding: 2rem;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table th {
    text-align: left;
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.modern-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    color: #e2e8f0;
    vertical-align: top;
}

.col-type {
    color: #f472b6 !important;
    font-family: monospace;
}

/* Pink for type */
.col-name {
    font-weight: 600;
    color: #f1f5f9;
}

.flag-pk {
    background: #facc15;
    color: #000;
    font-weight: 700;
    font-size: 0.65rem;
    padding: 2px 4px;
    border-radius: 2px;
    margin-left: 8px;
}


/* --- Section A: Universe Vertical Layout --- */
.universe-layout {
    display: flex;
    height: calc(100vh - 58px);
    /* Subtract navbar height approx */
    gap: 0;
    overflow: hidden;
    position: relative;
}