/* Custom Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --bs-primary: #2f5fe0;
    --bs-primary-rgb: 47, 95, 224;
    --bs-secondary: #64748b;
    --bs-secondary-rgb: 100, 116, 139;
    --bs-success: #16a34a;
    --bs-success-rgb: 22, 163, 74;
    --bs-info: #0891b2;
    --bs-info-rgb: 8, 145, 178;
    --bs-warning: #d97706;
    --bs-warning-rgb: 217, 119, 6;
    --bs-danger: #dc2626;
    --bs-danger-rgb: 220, 38, 38;
    --bs-body-bg: #f5f7fb;
    --bs-body-color: #1e293b;
    --bs-border-radius: 0.5rem;
    --bs-border-radius-sm: 0.375rem;
    --bs-border-radius-lg: 0.75rem;
    --bs-font-sans-serif: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --bs-font-monospace: 'JetBrains Mono', 'Fira Code', SFMono-Regular, Consolas, monospace;

    --nexora-sidebar-width: 250px;
    --nexora-sidebar-collapsed-width: 64px;
    --nexora-topbar-height: 56px;
}

[data-bs-theme="dark"] {
    --bs-body-bg: #0f1420;
    --bs-body-color: #e2e8f0;
    --bs-border-color: #263041;
    --bs-tertiary-bg: #161c2b;
    --bs-secondary-bg: #1a2233;
}

body {
    min-height: 100vh;
}

/* App shell */
.nexora-topbar {
    height: var(--nexora-topbar-height);
    position: sticky;
    top: 0;
    z-index: 1030;
    border-bottom: 1px solid var(--bs-border-color);
}

.nexora-sidebar {
    width: var(--nexora-sidebar-width);
    min-width: var(--nexora-sidebar-width);
    transition: width .15s ease, min-width .15s ease;
    border-right: 1px solid var(--bs-border-color);
    height: calc(100vh - var(--nexora-topbar-height));
    position: sticky;
    top: var(--nexora-topbar-height);
    overflow-y: auto;
}

.nexora-sidebar.is-collapsed {
    width: var(--nexora-sidebar-collapsed-width);
    min-width: var(--nexora-sidebar-collapsed-width);
}

.nexora-sidebar.is-collapsed .nexora-sidebar-label,
.nexora-sidebar.is-collapsed .nexora-sidebar-section-title {
    display: none;
}

.nexora-sidebar .nav-link {
    color: var(--bs-body-color);
    border-radius: var(--bs-border-radius-sm);
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .5rem .75rem;
    font-size: .9rem;
}

.nexora-sidebar .nav-link.active {
    background-color: rgba(47, 95, 224, 0.12); /* using primary color #2f5fe0 */
    color: var(--bs-primary);
    font-weight: 600;
}

.nexora-sidebar .nav-link:hover:not(.active) {
    background-color: var(--bs-tertiary-bg);
}

.nexora-sidebar-section-title {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--bs-secondary-color);
    padding: .75rem .75rem .25rem;
}

.nexora-main {
    min-height: calc(100vh - var(--nexora-topbar-height));
}

/* Cards / stat tiles */
.nexora-stat-card {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius-lg);
}

.nexora-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--bs-border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* SQL editor */
.nexora-monaco-host {
    height: 320px;
    border: 1px solid var(--bs-border-color);
    border-radius: var(--bs-border-radius);
    overflow: hidden;
}

/* Utility */
.nexora-empty-state,
.nexora-error-state {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--bs-secondary-color);
}

.cursor-pointer { cursor: pointer; }
