﻿* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    background: #f8f7f4;
    overflow: hidden;
}

.bf-app {
    display: flex;
    height: 100vh;
    font-family: 'Segoe UI', system-ui, sans-serif;
    font-size: 13px;
    overflow: hidden;
}

.bf-sidebar {
    width: 220px;
    min-width: 220px;
    height: 100vh;
    background: #1e3a5f;
    display: flex;
    flex-direction: column;
    transition: width .2s, min-width .2s;
    position: sticky;
    top: 0;
    flex-shrink: 0;
    z-index: 1030;
}

.bf-app.sidebar-collapsed .bf-sidebar {
    width: 48px;
    min-width: 48px;
}

.bf-sidebar-header {
    padding: 16px 14px 14px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.bf-sidebar-brand-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    white-space: nowrap;
}

.bf-sidebar-brand-mark {
    color: #5dcaa5;
    flex-shrink: 0;
}

.bf-sidebar-brand-text {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    transition: opacity .15s, width .15s;
}

.bf-app.sidebar-collapsed .bf-sidebar-brand-text {
    opacity: 0;
    width: 0;
}

.bf-sidebar-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 0;
}

.bf-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.bf-topbar {
    height: 48px;
    background: #fff;
    border-bottom: 0.5px solid #d3d1c7;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 10px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 1020;
}

.bf-toggle-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #5f5e5a;
    padding: 4px 6px;
    border-radius: 4px;
    line-height: 1;
}

    .bf-toggle-btn:hover {
        background: #f1efe8;
    }

.bf-breadcrumb {
    font-size: 12px;
    color: #888780;
}

    .bf-breadcrumb span {
        color: #334155;
        font-weight: 500;
    }

.bf-topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bf-user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #475569;
}

.bf-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #b5d4f4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #0c447c;
}

.bf-user-meta {
    line-height: 1.2;
}

.bf-user-name {
    font-weight: 600;
}

.bf-user-societate {
    color: #64748b;
    font-size: 11px;
}

.bf-content {
    padding: 20px;
    flex: 1;
    overflow: auto;
}

.bf-menu,
.bf-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .bf-menu > li > a,
    .bf-group-header {
        display: flex;
        align-items: center;
        gap: 9px;
        width: 100%;
        padding: 9px 14px;
        color: rgba(255,255,255,.65);
        text-decoration: none;
        font-size: 13px;
        cursor: pointer;
        border: none;
        background: transparent;
        border-left: 3px solid transparent;
        white-space: nowrap;
        overflow: hidden;
        transition: background .12s, color .12s;
    }

        .bf-menu > li > a:hover,
        .bf-group-header:hover {
            background: rgba(255,255,255,.08);
            color: #fff;
        }

    .bf-menu > li.active > a {
        background: rgba(255,255,255,.12);
        color: #fff;
        border-left-color: #5dcaa5;
        font-weight: 500;
    }

.bf-icon {
    width: 16px;
    text-align: center;
    flex-shrink: 0;
    font-size: 14px;
}

.bf-label {
    overflow: hidden;
    transition: opacity .15s, width .15s;
}

.bf-app.sidebar-collapsed .bf-label {
    opacity: 0;
    width: 0;
}

.bf-arrow {
    margin-left: auto;
    font-size: 9px;
    transition: transform .18s;
    opacity: .55;
    flex-shrink: 0;
}

.bf-app.sidebar-collapsed .bf-arrow {
    display: none;
}

.bf-menu-group.open > .bf-group-header .bf-arrow {
    transform: rotate(180deg);
}

.bf-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height .22s ease;
    background: rgba(0,0,0,.18);
}

.bf-app.sidebar-collapsed .bf-submenu {
    display: none;
}

.bf-menu-group.open > .bf-submenu {
    max-height: 500px;
}

.bf-submenu li a {
    display: flex;
    align-items: center;
    padding: 7px 14px 7px 40px;
    color: rgba(255,255,255,.55);
    text-decoration: none;
    font-size: 12px;
    border-left: 3px solid transparent;
    white-space: nowrap;
    transition: background .12s, color .12s;
}

    .bf-submenu li a:hover {
        background: rgba(255,255,255,.06);
        color: rgba(255,255,255,.88);
    }

.bf-submenu li.active > a {
    color: #fff;
    border-left-color: #5dcaa5;
    background: rgba(255,255,255,.08);
}

/* loader global */
#globalLoader {
    position: fixed;
    inset: 0;
    background: rgba(248,247,244,.72);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

    #globalLoader.show {
        display: flex;
    }

.global-loader-box {
    background: #fff;
    border: 1px solid #d3d1c7;
    border-radius: 12px;
    padding: 18px 20px;
    min-width: 180px;
    text-align: center;
    box-shadow: 0 12px 30px rgba(0,0,0,.08);
}

    .global-loader-box img {
        width: 48px;
        height: 48px;
        object-fit: contain;
        margin-bottom: 10px;
    }

.global-loader-text {
    font-size: 12px;
    color: #475569;
}

@media (max-width: 991.98px) {
    body {
        overflow: auto;
    }

    .bf-app {
        min-height: 100vh;
        height: auto;
    }

    .bf-sidebar {
        width: 48px;
        min-width: 48px;
        height: 100vh;
    }

    .bf-app:not(.sidebar-collapsed) .bf-sidebar {
        width: 220px;
        min-width: 220px;
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 1050;
        box-shadow: 0 0 0 9999px rgba(0,0,0,.25);
    }

    .bf-app.sidebar-collapsed .bf-sidebar .bf-label,
    .bf-app.sidebar-collapsed .bf-sidebar .bf-sidebar-brand-text {
        opacity: 0;
        width: 0;
    }

    .bf-content {
        padding: 16px;
    }
}
