/* ================= SIDEBAR ================= */

.sidebar{

    position:fixed;

    top:0;

    left:0;

    width:var(--sidebar-width);

    height:100vh;

    background:var(--color-sidebar);

    color:white;

    z-index:1100;

    overflow-y:auto;

    overscroll-behavior:contain;

    scrollbar-gutter:stable;

    scrollbar-width:thin;

    scrollbar-color:rgba(148,163,184,0.32) transparent;

    padding:22px 16px;

    box-shadow:
    2px 0 8px rgba(15,23,42,0.08);
}

/* ================= BRAND ================= */

.sidebar-brand{

    display:flex;

    align-items:center;

    gap:9px;

    margin-bottom:28px;
}

.sidebar-brand > div:last-child{

    min-width:0;
}

.brand-logo-wrap{

    width:44px;

    height:44px;

    flex:0 0 44px;

    border-radius:50%;

    background:white;

    display:flex;

    align-items:center;

    justify-content:center;

    overflow:hidden;

    box-shadow:0 4px 14px rgba(15,23,42,0.18);
}

.brand-logo{

    width:100%;

    height:100%;

    object-fit:contain;

    border-radius:50%;
}

.brand-title{

    font-size:21px;

    font-weight:800;

    color:white;

    line-height:1.2;
}

.brand-subtitle{

    font-size:11px;

    color:#9ca3af;

    margin-top:4px;

    white-space:nowrap;

    line-height:1.2;

    overflow:hidden;

    text-overflow:ellipsis;
}

/* ================= PAGE HELP ================= */

.page-title-help-row{

    display:flex;

    align-items:center;

    gap:10px;

    flex-wrap:wrap;
}

.page-help{

    display:inline-flex;
}

.page-help-trigger{

    width:34px;

    height:34px;

    border:1px solid #fde68a;

    border-radius:50%;

    background:#fef3c7;

    color:#b45309;

    display:inline-flex;

    align-items:center;

    justify-content:center;

    box-shadow:0 6px 16px rgba(180,83,9,0.14);
}

.page-help-trigger:hover{

    background:#fde68a;

    color:#92400e;
}

.page-help-menu{

    width:min(340px, calc(100vw - 32px));

    padding:14px;

    border:1px solid #fde68a;

    border-radius:12px;

    box-shadow:0 16px 34px rgba(15,23,42,0.14);
}

.page-help-label{

    font-size:12px;

    font-weight:800;

    color:#b45309;

    text-transform:uppercase;

    letter-spacing:.5px;
}

.page-help-title{

    font-size:16px;

    font-weight:800;

    color:#0f172a;

    margin-top:4px;
}

.page-help-short{

    font-size:14px;

    color:#475569;

    margin:8px 0 12px;

    line-height:1.45;
}

.page-help-modal .modal-header{

    background:#fffbeb;

    border-bottom:1px solid #fde68a;
}

.page-help-section{

    margin-bottom:18px;
}

.page-help-section h6{

    font-size:15px;

    font-weight:800;

    color:#0f172a;

    margin-bottom:8px;
}

.page-help-section li{

    margin-bottom:6px;

    color:#334155;

    line-height:1.45;
}

/* ================= MENU ================= */

.menu-group{

    margin-bottom:8px;

    border-radius:13px;
}

.menu-title{

    align-items:center;

    border:0;

    border-radius:11px;

    background:rgba(15,23,42,0.28);

    cursor:pointer;

    display:flex;

    font-size:11px;

    font-weight:900;

    letter-spacing:.8px;

    text-transform:uppercase;

    color:#a8b3c7;

    justify-content:space-between;

    margin-bottom:4px;

    padding:9px 10px 9px 12px;

    width:100%;
}

.menu-title:hover{

    background:rgba(255,255,255,0.08);

    color:#e5e7eb;
}

.menu-group.is-open > .menu-title{

    background:rgba(37,99,235,0.18);

    color:#dbeafe;

    box-shadow:inset 3px 0 0 #60a5fa;
}

.menu-group.is-active:not(.is-open) > .menu-title{

    background:rgba(255,255,255,0.035);

    color:#cbd5e1;

    box-shadow:inset 3px 0 0 rgba(96,165,250,0.46);
}

.menu-group.is-active.is-open > .menu-title{

    background:rgba(37,99,235,0.18);

    color:#dbeafe;

    box-shadow:inset 3px 0 0 #60a5fa;
}

.menu-title::after{

    content:"\F282";

    display:inline-flex;

    font-family:"bootstrap-icons";

    font-size:12px;

    line-height:1;

    margin-left:8px;

    opacity:.72;

    transition:transform .12s ease;
}

.menu-group.is-open > .menu-title::after{

    transform:rotate(180deg);
}

.sidebar-menu{

    display:none;

    flex-direction:column;

    gap:3px;

    padding:3px 0 7px 12px;

    margin-left:7px;

    border-left:1px solid rgba(148,163,184,0.18);
}

.menu-group.is-open > .sidebar-menu{

    display:flex;
}

.sidebar-link{

    display:flex;

    align-items:center;

    justify-content:space-between;

    gap:9px;

    min-height:38px;

    padding:8px 10px;

    border-radius:9px;

    color:#cbd5e1;

    transition:var(--transition);

    font-size:13px;

    font-weight:700;
}

.sidebar-link:hover{

    background:
    rgba(255,255,255,0.07);

    color:white;
}

.sidebar-link.active{

    background:#2563eb;

    color:white;

    box-shadow:none;

    transform:translateX(2px);
}

.sidebar-link-left{

    display:flex;

    align-items:center;

    gap:9px;

    min-width:0;
}

.sidebar-icon{

    align-items:center;

    display:inline-flex;

    justify-content:center;

    font-size:15px;

    width:18px;

    min-width:18px;

    text-align:center;
}

.sidebar-link-left span{

    overflow:hidden;

    text-overflow:ellipsis;

    white-space:normal;

    line-height:1.25;
}

/* ================= BADGE ================= */

.sidebar-badge{

    min-width:22px;

    height:22px;

    padding:0 8px;

    border-radius:999px;

    display:flex;

    align-items:center;

    justify-content:center;

    font-size:12px;

    font-weight:700;

    background:#dc2626;

    color:white;
}

/* ================= TOPBAR ================= */

.topbar{

    height:74px;

    background:#ffffff;

    border-bottom:
    1px solid rgba(226,232,240,0.95);

    box-shadow:0 1px 0 rgba(15,23,42,0.02), 0 8px 22px rgba(15,23,42,0.035);

    display:flex;

    align-items:center;

    justify-content:space-between;

    padding:0 24px;

    position:relative;

    z-index:900;
}

.topbar-brand-title{

    font-size:19px;

    font-weight:800;

    color:#0f172a;

    letter-spacing:.1px;
}

.topbar-brand-subtitle{

    font-size:13px;

    font-weight:700;

    color:#64748b;
}

/* ================= TOPBAR LEFT ================= */

.topbar-left{

    display:flex;

    align-items:center;

    gap:16px;
}

.mobile-toggle{

    width:42px;

    height:42px;

    border:1px solid rgba(226,232,240,0.96);

    border-radius:12px;

    background:#f8fafc;

    color:#0f172a;

    box-shadow:0 8px 20px rgba(15,23,42,0.06);

    display:none;

    align-items:center;

    justify-content:center;

    font-size:21px;
}

/* ================= TOPBAR RIGHT ================= */

.topbar-right{

    display:flex;

    align-items:center;

    gap:16px;

    position:relative;
}

/* ================= PROFILE ================= */

.topbar-profile{

    display:flex;

    align-items:center;

    gap:12px;

    border:0;

    background:transparent;

    padding:6px 8px 6px 6px;

    border-radius:999px;

    color:inherit;

    cursor:pointer;

    text-align:left;
}

.topbar-profile:hover{

    background:#f8fafc;
}

.topbar-profile:focus-visible{

    outline:2px solid rgba(37,99,235,0.42);

    outline-offset:4px;
}

.profile-avatar{

    width:42px;

    height:42px;

    border-radius:50%;

    background:linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);

    color:white;

    display:flex;

    align-items:center;

    justify-content:center;

    font-weight:700;

    font-size:15px;

    box-shadow:0 8px 18px rgba(37,99,235,0.23);
}

.profile-info{

    line-height:1.2;
}

.profile-name{

    font-size:14px;

    font-weight:800;

    color:#0f172a;
}

.profile-role{

    font-size:12px;

    color:#64748b;
}

.profile-chevron{

    color:#64748b;

    font-size:13px;
}

.topbar-profile-menu{

    position:absolute;

    top:calc(100% + 12px);

    right:0;

    width:220px;

    background:#ffffff;

    color:#111827;

    border:1px solid rgba(226,232,240,0.95);

    border-radius:12px;

    box-shadow:0 14px 32px rgba(15,23,42,0.16);

    padding:8px;

    opacity:0;

    visibility:hidden;

    transform:translateY(-6px);

    transition:opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;

    z-index:1200;
}

.topbar-profile-menu.show{

    opacity:1;

    visibility:visible;

    transform:translateY(0);
}

.topbar-profile-menu-head{

    padding:8px 10px 10px;

    border-bottom:1px solid #e5e7eb;

    margin-bottom:6px;
}

.topbar-profile-menu-head strong,
.topbar-profile-menu-head span{

    display:block;

    overflow:hidden;

    text-overflow:ellipsis;

    white-space:nowrap;
}

.topbar-profile-menu-head strong{

    font-size:14px;
}

.topbar-profile-menu-head span{

    margin-top:3px;

    font-size:12px;

    color:#64748b;
}

.topbar-profile-menu a{

    display:flex;

    align-items:center;

    gap:9px;

    min-height:38px;

    padding:8px 10px;

    border-radius:8px;

    color:#334155;

    font-weight:700;

    font-size:14px;
}

.topbar-profile-menu a:hover{

    background:#f1f5f9;

    color:#111827;
}

.topbar-profile-menu .logout-link{

    color:#b91c1c;
}

.topbar-profile-menu .logout-link:hover{

    background:#fef2f2;

    color:#991b1b;
}

/* ================= PAGE HEADER ================= */

.page-header{

    display:flex;

    align-items:center;

    justify-content:space-between;

    margin-bottom:24px;

    gap:20px;
}

.sidebar-overlay{

    display:none;
}
