/* /Components/Layout/MainLayout.razor.rz.scp.css */
.app-shell[b-e3obn8oqrk] {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Content area fills the viewport below the header so the chat module can take the whole page. */
.app-content[b-e3obn8oqrk] {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.app-header[b-e3obn8oqrk] {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    height: 62px;
    padding: 0 1.25rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--border, #e6e8ec);
    position: sticky;
    top: 0;
    z-index: 20;
}

/* ---- brand ---- */
.brand[b-e3obn8oqrk] {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text, #0f172a);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    padding-right: 1.25rem;
    margin-right: 0.25rem;
    border-right: 1px solid var(--border, #e6e8ec);
    height: 100%;
}

.brand-mark[b-e3obn8oqrk] {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent, #4f46e5), #7c3aed);
    color: #fff;
    font-size: 1.05rem;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--accent, #4f46e5) 35%, transparent);
}

/* ---- nav: plain links with an active underline (standard top-nav pattern).
   NavLink renders a child-component <a>, so reach it with ::deep. ---- */
.app-nav[b-e3obn8oqrk] {
    display: flex;
    align-self: stretch;       /* fill header height so the active underline sits on its bottom edge */
    align-items: stretch;
    gap: 0.5rem;
}

.app-nav[b-e3obn8oqrk]  a {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    color: var(--text-muted, #64748b);
    padding: 0 0.35rem;
    font-size: 0.92rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;       /* overlap the header's bottom border */
    transition: color 0.15s ease, border-color 0.15s ease;
}

.app-nav[b-e3obn8oqrk]  a svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.app-nav[b-e3obn8oqrk]  a:hover { color: var(--text, #0f172a); }

.app-nav[b-e3obn8oqrk]  a.active {
    color: var(--accent, #4f46e5);
    border-bottom-color: var(--accent, #4f46e5);
    font-weight: 600;
}

.app-nav[b-e3obn8oqrk]  a.active svg { opacity: 1; }

/* ---- nav dropdown (Data Sources submenu), native <details> ---- */
.nav-dropdown[b-e3obn8oqrk] {
    position: relative;
    display: flex;
    align-items: stretch;
}

.nav-dropdown-summary[b-e3obn8oqrk] {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    list-style: none;
    color: var(--text-muted, #64748b);
    padding: 0 0.35rem;
    font-size: 0.92rem;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-dropdown-summary[b-e3obn8oqrk]::-webkit-details-marker { display: none; }
.nav-dropdown-summary[b-e3obn8oqrk]::marker { content: ""; }
.nav-dropdown-summary svg[b-e3obn8oqrk] { width: 16px; height: 16px; opacity: 0.7; }
.nav-dropdown-summary:hover[b-e3obn8oqrk] { color: var(--text, #0f172a); }
.nav-dropdown-summary.active[b-e3obn8oqrk] { color: var(--accent, #4f46e5); border-bottom-color: var(--accent, #4f46e5); font-weight: 600; }
.nav-dropdown-summary.active svg[b-e3obn8oqrk] { opacity: 1; }

.nav-chevron[b-e3obn8oqrk] { width: 13px; height: 13px; transition: transform 0.18s ease; }
.nav-dropdown[open] .nav-chevron[b-e3obn8oqrk] { transform: rotate(180deg); }

.nav-dropdown-panel[b-e3obn8oqrk] {
    position: absolute;
    top: calc(100% + 0.4rem);
    left: 0;
    min-width: 190px;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e6e8ec);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.06);
    padding: 0.35rem;
    z-index: 30;
    animation: dropdown-in-b-e3obn8oqrk 0.14s ease;
}

.nav-dropdown-panel[b-e3obn8oqrk]  a {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text, #0f172a);
    font-size: 0.9rem;
    font-weight: 500;
    border-bottom: none;
    margin-bottom: 0;
}

.nav-dropdown-panel[b-e3obn8oqrk]  a svg { width: 16px; height: 16px; opacity: 0.7; }
.nav-dropdown-panel[b-e3obn8oqrk]  a:hover { background: var(--surface-2, #f1f5f9); }
.nav-dropdown-panel[b-e3obn8oqrk]  a.active { color: var(--accent, #4f46e5); background: color-mix(in srgb, var(--accent, #4f46e5) 10%, transparent); }
.nav-dropdown-panel[b-e3obn8oqrk]  a.active svg { opacity: 1; }

/* ---- user menu (native <details> dropdown — no JS) ---- */
.user-menu[b-e3obn8oqrk] {
    margin-left: auto;
    position: relative;
}

.user-chip[b-e3obn8oqrk] {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.3rem 0.55rem 0.3rem 0.35rem;
    border: 1px solid var(--border, #e6e8ec);
    border-radius: 999px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.user-chip[b-e3obn8oqrk]::-webkit-details-marker { display: none; }
.user-chip[b-e3obn8oqrk]::marker { content: ""; }
.user-chip:hover[b-e3obn8oqrk] { background: var(--surface-2, #f1f5f9); border-color: #cbd5e1; }

.user-avatar[b-e3obn8oqrk] {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.user-avatar-fallback[b-e3obn8oqrk] {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--accent, #4f46e5), #7c3aed);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 700;
}

.user-name[b-e3obn8oqrk] {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text, #0f172a);
    max-width: 16ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chevron[b-e3obn8oqrk] {
    width: 15px;
    height: 15px;
    color: var(--text-muted, #94a3b8);
    transition: transform 0.18s ease;
}

.user-menu[open] .chevron[b-e3obn8oqrk] { transform: rotate(180deg); }

.user-dropdown[b-e3obn8oqrk] {
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    min-width: 230px;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e6e8ec);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.06);
    padding: 0.4rem;
    z-index: 30;
    animation: dropdown-in-b-e3obn8oqrk 0.14s ease;
}

@keyframes dropdown-in-b-e3obn8oqrk {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.user-dropdown-head[b-e3obn8oqrk] {
    padding: 0.6rem 0.7rem 0.7rem;
    border-bottom: 1px solid var(--border, #eef1f4);
    margin-bottom: 0.35rem;
}

.user-dropdown-name[b-e3obn8oqrk] { font-weight: 700; font-size: 0.92rem; color: var(--text, #0f172a); }
.user-dropdown-email[b-e3obn8oqrk] { font-size: 0.8rem; color: var(--text-muted, #94a3b8); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.user-dropdown-role[b-e3obn8oqrk] {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: #ede9fe;
    color: #6d28d9;
}

.user-dropdown-foot[b-e3obn8oqrk] { margin: 0; }

.dropdown-item[b-e3obn8oqrk] {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.6rem 0.7rem;
    border: none;
    background: transparent;
    border-radius: 9px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text, #0f172a);
    cursor: pointer;
    text-align: left;
    transition: background 0.12s ease, color 0.12s ease;
}

.dropdown-item svg[b-e3obn8oqrk] { width: 17px; height: 17px; color: var(--text-muted, #94a3b8); }
.dropdown-item:hover[b-e3obn8oqrk] { background: #fef2f2; color: var(--danger, #dc2626); }
.dropdown-item:hover svg[b-e3obn8oqrk] { color: var(--danger, #dc2626); }

@media (max-width: 640px) {
    .user-name[b-e3obn8oqrk] { display: none; }
    .app-nav[b-e3obn8oqrk]  a span { display: none; }
    .app-nav[b-e3obn8oqrk]  a { padding: 0.5rem; }
    .brand-name[b-e3obn8oqrk] { display: none; }
}

#blazor-error-ui[b-e3obn8oqrk] {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss[b-e3obn8oqrk] {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }
/* /Components/Layout/NavMenu.razor.rz.scp.css */
.navbar-toggler[b-vuzrwd6mp5] {
    appearance: none;
    cursor: pointer;
    width: 3.5rem;
    height: 2.5rem;
    color: white;
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255, 255, 255, 0.1);
}

.navbar-toggler:checked[b-vuzrwd6mp5] {
    background-color: rgba(255, 255, 255, 0.5);
}

.top-row[b-vuzrwd6mp5] {
    min-height: 3.5rem;
    background-color: rgba(0,0,0,0.4);
}

.navbar-brand[b-vuzrwd6mp5] {
    font-size: 1.1rem;
}

.bi[b-vuzrwd6mp5] {
    display: inline-block;
    position: relative;
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    top: -1px;
    background-size: cover;
}

.bi-house-door-fill-nav-menu[b-vuzrwd6mp5] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-house-door-fill' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z'/%3E%3C/svg%3E");
}

.bi-plus-square-fill-nav-menu[b-vuzrwd6mp5] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-plus-square-fill' viewBox='0 0 16 16'%3E%3Cpath d='M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm6.5 4.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3a.5.5 0 0 1 1 0z'/%3E%3C/svg%3E");
}

.bi-list-nested-nav-menu[b-vuzrwd6mp5] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-list-nested' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4.5 11.5A.5.5 0 0 1 5 11h10a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 1 3h10a.5.5 0 0 1 0 1H1a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E");
}

.nav-item[b-vuzrwd6mp5] {
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
}

    .nav-item:first-of-type[b-vuzrwd6mp5] {
        padding-top: 1rem;
    }

    .nav-item:last-of-type[b-vuzrwd6mp5] {
        padding-bottom: 1rem;
    }

    .nav-item[b-vuzrwd6mp5]  .nav-link {
        color: #d7d7d7;
        background: none;
        border: none;
        border-radius: 4px;
        height: 3rem;
        display: flex;
        align-items: center;
        line-height: 3rem;
        width: 100%;
    }

.nav-item[b-vuzrwd6mp5]  a.active {
    background-color: rgba(255,255,255,0.37);
    color: white;
}

.nav-item[b-vuzrwd6mp5]  .nav-link:hover {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.nav-scrollable[b-vuzrwd6mp5] {
    display: none;
}

.navbar-toggler:checked ~ .nav-scrollable[b-vuzrwd6mp5] {
    display: block;
}

@media (min-width: 641px) {
    .navbar-toggler[b-vuzrwd6mp5] {
        display: none;
    }

    .nav-scrollable[b-vuzrwd6mp5] {
        /* Never collapse the sidebar for wide screens */
        display: block;

        /* Allow sidebar to scroll for tall menus */
        height: calc(100vh - 3.5rem);
        overflow-y: auto;
    }
}
