/* /Components/Layout/MainLayout.razor.rz.scp.css */
.page[b-h3lu3u3iq6] {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main[b-h3lu3u3iq6] {
    flex: 1;
    min-width: 0;
}

/* Vùng nội dung: nền trắng */
main[b-h3lu3u3iq6] {
    background-color: var(--kns-bg, #ffffff);
}

/* Top bar — sticky luôn, mọi kích thước */
.top-row[b-h3lu3u3iq6] {
    background-color: #ffffff;
    border-bottom: 1px solid var(--kns-border, #e2e8f0);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
    min-height: 3.5rem;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 30;
    padding-top: env(safe-area-inset-top, 0);
}

.scope-badge[b-h3lu3u3iq6] {
    font-size: 0.78rem;
    padding: 0.4rem 0.7rem;
    white-space: nowrap;
}

/* Admin chip — hiển thị tài khoản đang đăng nhập */
.admin-chip[b-h3lu3u3iq6] {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    font-size: 0.85rem;
    color: #15803d;
    font-weight: 500;
    white-space: nowrap;
    max-width: 200px;
}
.admin-chip i[b-h3lu3u3iq6] {
    font-size: 1.1rem;
    flex-shrink: 0;
}
.admin-chip-name[b-h3lu3u3iq6] {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 575.98px) {
    .admin-chip[b-h3lu3u3iq6] { max-width: 110px; padding: 0.3rem 0.55rem; font-size: 0.78rem; }
    .admin-chip i[b-h3lu3u3iq6] { font-size: 1rem; }
}

/* Hamburger button — đẹp, xanh lá, vừa tay */
.kns-hamburger[b-h3lu3u3iq6] {
    width: 2.5rem; height: 2.5rem;
    padding: 0;
    display: inline-flex;
    align-items: center; justify-content: center;
    border-radius: 8px;
    background: #16a34a;
    border: 1px solid #15803d;
    color: #fff;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.3);
    flex-shrink: 0;
}
.kns-hamburger:hover[b-h3lu3u3iq6], .kns-hamburger:focus[b-h3lu3u3iq6] {
    background: #15803d;
    color: #fff;
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.45);
}
.kns-hamburger i[b-h3lu3u3iq6] { font-size: 1.4rem; line-height: 1; }

/* Brand mini trong topbar — chỉ mobile */
.kns-topbar-brand[b-h3lu3u3iq6] {
    display: inline-flex; align-items: center; gap: 0.45rem;
    text-decoration: none;
    color: var(--kns-text, #1e293b);
    font-weight: 700;
    flex-shrink: 0;
}
.kns-topbar-brand .brand-logo[b-h3lu3u3iq6] {
    width: 1.9rem; height: 1.9rem; border-radius: 7px;
    background: linear-gradient(135deg, #22c55e, #15803d);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1rem;
}
.kns-topbar-brand .brand-name[b-h3lu3u3iq6] { font-size: 1rem; }

.kns-search-wrap[b-h3lu3u3iq6] {
    min-width: 0;
    max-width: 520px;
}

/* ============================================================
   DESKTOP (>= 992px): sidebar cố định, splitter kéo được
   ============================================================ */
@media (min-width: 992px) {
    .page[b-h3lu3u3iq6] {
        flex-direction: row;
    }

    .sidebar[b-h3lu3u3iq6] {
        width: 240px;
        height: 100vh;
        position: sticky;
        top: 0;
        flex-shrink: 0;
        overflow-y: auto;
    }

    .sidebar-splitter[b-h3lu3u3iq6] {
        width: 5px;
        min-height: 100vh;
        position: sticky;
        top: 0;
        flex-shrink: 0;
        cursor: ew-resize;
        background: rgba(0,0,0,0.05);
        transition: background 0.15s;
    }

    .sidebar-splitter:hover[b-h3lu3u3iq6],
    .sidebar-splitter:active[b-h3lu3u3iq6] {
        background: var(--kns-primary, #16a34a);
    }

    .top-row[b-h3lu3u3iq6], article[b-h3lu3u3iq6] {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    article.content[b-h3lu3u3iq6] {
        padding-top: 1.25rem !important;
        padding-bottom: 2rem !important;
    }
}

/* ============================================================
   MOBILE / TABLET (< 992px): sidebar = drawer (xử lý ở NavMenu.razor)
   ============================================================ */
@media (max-width: 991.98px) {
    /* Ẩn splitter trên mobile */
    .sidebar-splitter[b-h3lu3u3iq6] { display: none !important; }

    .top-row[b-h3lu3u3iq6] {
        padding-left: 0.6rem !important;
        padding-right: 0.6rem !important;
        gap: 0.45rem !important;
        min-height: 3.25rem;
    }

    article.content[b-h3lu3u3iq6] {
        padding-top: 0.9rem !important;
        padding-bottom: 1.5rem !important;
    }

    /* Trên màn rất hẹp, ẩn brand-name + chữ scope-label, chỉ giữ icon + tên trường */
    .scope-badge .scope-label-text[b-h3lu3u3iq6] { display: none; }
}

/* Cực hẹp (< 480px): tối ưu thêm */
@media (max-width: 479.98px) {
    .kns-topbar-brand .brand-name[b-h3lu3u3iq6] { display: none; }
    .scope-badge[b-h3lu3u3iq6] { font-size: 0.72rem; padding: 0.3rem 0.5rem; }
    .top-row[b-h3lu3u3iq6] { gap: 0.35rem !important; }
}

#blazor-error-ui[b-h3lu3u3iq6] {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    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-h3lu3u3iq6] {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }
/* /Components/Layout/NavMenu.razor.rz.scp.css */
/* ===== Mobile toggler ===== */
.navbar-toggler[b-q9v0a3wq8t] {
    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-q9v0a3wq8t] {
    background-color: rgba(255, 255, 255, 0.5);
}

/* ===== Brand row ===== */
.brand-row[b-q9v0a3wq8t] {
    height: 4rem;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.navbar-brand[b-q9v0a3wq8t] {
    gap: 0.6rem;
    padding: 0;
}

.brand-logo[b-q9v0a3wq8t] {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 9px;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.15rem;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.brand-text[b-q9v0a3wq8t] {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-name[b-q9v0a3wq8t] {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.3px;
}

.brand-sub[b-q9v0a3wq8t] {
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
}

/* ===== Section title ===== */
.nav-section-title[b-q9v0a3wq8t] {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #93c5fd;                         /* xanh nhạt — nổi rõ trên nền slate */
    background: rgba(255, 255, 255, 0.04);
    padding: 0.5rem 1.5rem;
    margin-top: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    border-left: 3px solid #3b82f6;
}

.nav-section-title i[b-q9v0a3wq8t] {
    font-size: 0.85rem;
    opacity: 1;
}

/* ===== Nav items ===== */
.nav-item[b-q9v0a3wq8t] {
    font-size: 0.92rem;
    padding-bottom: 0.15rem;
}

.nav-item:first-of-type[b-q9v0a3wq8t] {
    padding-top: 0.85rem;
}

[b-q9v0a3wq8t] .nav-link {
    color: #e8edf4 !important;            /* gần trắng — không bị chìm vào nền tối */
    background: none;
    border: none;
    border-radius: 7px;
    padding: 0.55rem 0.7rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.65rem;
    line-height: 1.35 !important;
    width: 100%;
    white-space: normal;
    text-decoration: none;
    position: relative;
    transition: background 0.13s ease, color 0.13s ease;
}

[b-q9v0a3wq8t] .nav-link i.bi {
    font-size: 1.05rem;
    width: 1.4rem;
    flex-shrink: 0;
    text-align: center;
    line-height: 1;
    opacity: 1;
    color: #cbd5e1;
}

[b-q9v0a3wq8t] .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff !important;
}

/* Active item: nền sáng + thanh nhấn bên trái */
[b-q9v0a3wq8t] a.active {
    background-color: rgba(59, 130, 246, 0.22) !important;
    color: #fff !important;
    font-weight: 600;
}

[b-q9v0a3wq8t] a.active i.bi {
    opacity: 1;
    color: #93c5fd;
}

[b-q9v0a3wq8t] a.active::before {
    content: "";
    position: absolute;
    left: -0.2rem;
    top: 0.3rem;
    bottom: 0.3rem;
    width: 3px;
    border-radius: 3px;
    background: #60a5fa;
}

/* ===== User footer ===== */
.user-footer[b-q9v0a3wq8t] {
    margin-top: 1.5rem;
    padding-top: 0.9rem;
    padding-bottom: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}

.user-card[b-q9v0a3wq8t] {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.6rem;
}

.user-avatar[b-q9v0a3wq8t] {
    font-size: 1.9rem;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1;
}

.user-name[b-q9v0a3wq8t] {
    color: #fff;
    font-size: 0.86rem;
    font-weight: 600;
}

.user-role[b-q9v0a3wq8t] {
    margin-top: 1px;
}

.user-role .badge[b-q9v0a3wq8t] {
    font-size: 8.5px;
    letter-spacing: 0.5px;
}

.user-scope[b-q9v0a3wq8t] {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.72);
    margin-left: 3px;
}

.logout-btn[b-q9v0a3wq8t] {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.85);
    border-radius: 7px;
    transition: background 0.13s ease;
}

.logout-btn:hover[b-q9v0a3wq8t] {
    background: rgba(220, 53, 69, 0.85);
    border-color: rgba(220, 53, 69, 0.85);
    color: #fff;
}

/* ===== Scroll behaviour ===== */
.nav-scrollable[b-q9v0a3wq8t] {
    display: none;
}

.navbar-toggler:checked ~ .nav-scrollable[b-q9v0a3wq8t] {
    display: block;
}

@media (min-width: 641px) {
    .navbar-toggler[b-q9v0a3wq8t] {
        display: none;
    }

    .nav-scrollable[b-q9v0a3wq8t] {
        display: block;
        height: calc(100vh - 4rem);
        overflow-y: auto;
    }

    /* Scrollbar mảnh cho sidebar */
    .nav-scrollable[b-q9v0a3wq8t]::-webkit-scrollbar {
        width: 6px;
    }
    .nav-scrollable[b-q9v0a3wq8t]::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.15);
        border-radius: 3px;
    }
}
