/* ==========================================================
   NAVBAR
========================================================== */

.erp-navbar{

    height:72px;

    background:var(--card);

    border-bottom:1px solid var(--border-alt);

    display:flex;

    align-items:center;

    justify-content:space-between;

    padding:0 28px;

    position:sticky;

    top:0;

    z-index:100;

}

/* ==========================================================
   LEFT
========================================================== */

.erp-navbar-left{

    display:flex;

    align-items:center;

    gap:18px;

}

.navbar-title{

    font-size:22px;

    font-weight:700;

    color:var(--text-strong);

}

.erp-sidebar-toggle{

    width:42px;

    height:42px;

    padding:0;

    border:1px solid var(--border-alt);

    border-radius:10px;

    background:var(--card);

    color:var(--text-muted);

    display:flex;

    align-items:center;

    justify-content:center;

    cursor:pointer;

    transition:.18s;

    flex-shrink:0;

}

.erp-sidebar-toggle:hover{

    background:var(--surface-alt);

    color:var(--text-strong);

}

.erp-sidebar-toggle svg,
.erp-sidebar-toggle i{

    width:19px;

    height:19px;

}

/* ==========================================================
   SEARCH
========================================================== */

.erp-search{

    position:relative;

    width:360px;

}

.navbar-search input{

    width:100%;

    height:42px;

    padding:0 16px 0 42px;

    border:1px solid var(--border-strong);

    border-radius:10px;

    background:var(--surface-alt);

}

.navbar-search svg,
.navbar-search i{

    position:absolute;

    left:14px;

    top:50%;

    transform:translateY(-50%);

    color:var(--text-faint);

    width:18px;

    height:18px;

}

/* ==========================================================
   RIGHT
========================================================== */

.erp-navbar-right{

    display:flex;

    align-items:center;

    gap:16px;

}

/* ==========================================================
   NAV ICON BUTTONS (камбанка, бързи действия, тема)
========================================================== */

.erp-nav-btn{

    width:42px;

    height:42px;

    padding:0;

    border:1px solid var(--border-alt);

    border-radius:10px;

    background:var(--card);

    color:var(--text-muted);

    display:flex;

    align-items:center;

    justify-content:center;

    cursor:pointer;

    transition:.18s;

}

.erp-nav-btn:hover{

    background:var(--surface-alt);

    color:var(--text-strong);

}

.erp-nav-btn svg,
.erp-nav-btn i{

    width:19px;

    height:19px;

}

/* ==========================================================
   ICON BUTTONS (legacy)
========================================================== */

.nav-icon{

    width:42px;

    height:42px;

    border-radius:10px;

    display:flex;

    align-items:center;

    justify-content:center;

    cursor:pointer;

    transition:.18s;

    color:#475569;

}

.nav-icon:hover{

    background:#F1F5F9;

}

/* ==========================================================
   USER
========================================================== */

.erp-user{

    display:flex;

    align-items:center;

    gap:12px;

    cursor:pointer;

    padding:6px 10px;

    border-radius:10px;

    transition:.18s;

}

.erp-user:hover{

    background:var(--surface-alt);

}

.erp-user-avatar{

    width:42px;

    height:42px;

    border-radius:50%;

    background:#C9A227;

    color:#fff;

    display:flex;

    align-items:center;

    justify-content:center;

    font-weight:700;

    font-size:15px;

}

.erp-user-info{

    display:flex;

    flex-direction:column;

    line-height:1.2;

}

.erp-user-info strong{

    font-weight:600;

    color:var(--text-strong);

    font-size:14px;

}

.erp-user-info small{

    font-size:12px;

    color:var(--text-faint);

}

.erp-user-menu{

    position:relative;

}

.erp-user-panel{

    position:absolute;

    top:calc(100% + 8px);

    right:0;

    min-width:180px;

    background:var(--card);

    border:1px solid var(--border-alt);

    border-radius:12px;

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

    padding:6px;

    z-index:200;

}

.erp-user-panel-item{

    display:flex;

    align-items:center;

    gap:10px;

    padding:10px 12px;

    border-radius:8px;

    color:var(--text-strong);

    text-decoration:none;

    font-size:14px;

    font-weight:500;

    transition:.15s;

}

.erp-user-panel-item:hover{

    background:var(--surface-alt);

}

.erp-user-panel-item svg,
.erp-user-panel-item i{

    width:16px;

    height:16px;

    color:var(--text-muted);

}

/* ==========================================================
   NOTIFICATIONS
========================================================== */

.erp-notifications{

    position:relative;

}

.erp-notif-badge{

    position:absolute;

    top:2px;

    right:2px;

    min-width:16px;

    height:16px;

    padding:0 4px;

    border-radius:20px;

    background:#DC2626;

    color:#fff;

    display:flex;

    align-items:center;

    justify-content:center;

    font-size:10px;

    font-weight:700;

    pointer-events:none;

}

.erp-notif-panel{

    position:absolute;

    top:calc(100% + 8px);

    right:0;

    width:360px;

    max-height:440px;

    overflow-y:auto;

    background:var(--card);

    border:1px solid var(--border-alt);

    border-radius:12px;

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

    z-index:200;

}

.erp-notif-panel-header{

    padding:14px 16px;

    font-weight:700;

    font-size:14px;

    border-bottom:1px solid var(--border-alt);

    color:var(--text-strong);

}

.erp-notif-list{

    padding:6px;

}

.erp-notif-empty{

    padding:24px 16px;

    text-align:center;

    color:var(--text-faint);

    font-size:13px;

}

.erp-notif-item{

    padding:10px 10px;

    border-radius:8px;

    border-bottom:1px solid var(--border);

}

.erp-notif-item:last-child{

    border-bottom:none;

}

.erp-notif-item:hover{

    background:var(--surface-alt);

}

.erp-notif-clickable{

    cursor:pointer;

}

.erp-notif-item-header{

    display:flex;

    align-items:flex-start;

    justify-content:space-between;

    gap:8px;

}

.erp-notif-item-header strong{

    font-size:13px;

    color:var(--text-strong);

}

.erp-notif-delete{

    background:transparent;

    border:none;

    color:var(--text-faint);

    font-size:18px;

    line-height:1;

    height:auto;

    padding:0 2px;

    cursor:pointer;

}

.erp-notif-delete:hover{

    color:#DC2626;

}

.erp-notif-message{

    font-size:12px;

    color:var(--text-muted);

    margin-top:4px;

}

.erp-notif-affected{

    display:flex;

    flex-direction:column;

    gap:2px;

    margin-top:6px;

    font-size:12px;

}

.erp-notif-affected a{

    color:#C9A227;

    text-decoration:none;

}

.erp-notif-affected a:hover{

    text-decoration:underline;

}

.erp-notif-date{

    font-size:11px;

    color:var(--text-faint);

    margin-top:6px;

}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media(max-width:992px){

    .erp-search{

        display:none;

    }

}

@media(max-width:768px){

    .erp-navbar{

        padding:0 16px;

    }

    .erp-user-info{

        display:none;

    }

    .erp-notif-panel{

        position:fixed;

        top:72px;

        left:8px;

        right:8px;

        width:auto;

        max-height:calc(100vh - 90px);

    }

}
