/*
 * Theme Name:  NetMkd DeskPortal
 * Theme URI:   https://netmkd.mk
 * Description: Модерен корпоративен портал со систем за улоги, документи, известувања и активности.
 * Author:      NetMkd
 * Author URI:  https://netmkd.mk
 * Version:     1.0.0
 * Text Domain: netmkd_deskportal
 * Tags:        corporate, portal, dashboard, roles, documents
 */

/* ============================================================
   CSS CUSTOM PROPERTIES — ПАЛЕТИ НА БОИ
   ============================================================ */

/* Дефолтна палета — Темно Сина (Corporate) */
:root, body, html.nmdp-blue {
    --nmdp-primary:           #1e3a8a;
    --nmdp-primary-light:     #2563eb;
    --nmdp-primary-dark:      #1e2d6e;
    --nmdp-topbar-bg:         #1e3a8a;
    --nmdp-topbar-text:       #ffffff;
    --nmdp-sidebar-bg:        #ffffff;
    --nmdp-sidebar-text:      #1e3a8a;
    --nmdp-sidebar-hover-bg:  #eff6ff;
    --nmdp-sidebar-hover-text:#1e3a8a;
    --nmdp-active-bg:         #2563eb;
    --nmdp-active-text:       #ffffff;
    --nmdp-site-bg:           #f0f4f8;
    --nmdp-submenu-bg:        #f8fafc;
    --nmdp-accent:            #f59e0b;
}

/* Тиркизна */
.nmdp-teal, html.nmdp-teal {
    --nmdp-primary:           #009688;
    --nmdp-primary-light:     #00796b;
    --nmdp-primary-dark:      #00695c;
    --nmdp-topbar-bg:         #009688;
    --nmdp-topbar-text:       #ffffff;
    --nmdp-sidebar-bg:        #b2dfdb;
    --nmdp-sidebar-text:      #004d40;
    --nmdp-sidebar-hover-bg:  #00796b;
    --nmdp-sidebar-hover-text:#ffffff;
    --nmdp-active-bg:         #ff8a80;
    --nmdp-active-text:       #ffffff;
    --nmdp-site-bg:           #e0f2f1;
    --nmdp-submenu-bg:        #96cecb;
    --nmdp-accent:            #ff8a80;
}

/* Темно Зелена */
.nmdp-green, html.nmdp-green {
    --nmdp-primary:           #2e7d32;
    --nmdp-primary-light:     #388e3c;
    --nmdp-primary-dark:      #1b5e20;
    --nmdp-topbar-bg:         #2e7d32;
    --nmdp-topbar-text:       #ffffff;
    --nmdp-sidebar-bg:        #e8f5e9;
    --nmdp-sidebar-text:      #1b5e20;
    --nmdp-sidebar-hover-bg:  #1b5e20;
    --nmdp-sidebar-hover-text:#ffffff;
    --nmdp-active-bg:         #ffb74d;
    --nmdp-active-text:       #1b5e20;
    --nmdp-site-bg:           #f1f8e9;
    --nmdp-submenu-bg:        #d4edd6;
    --nmdp-accent:            #ffb74d;
}

/* Корпоративна */
.nmdp-corporate, html.nmdp-corporate {
    --nmdp-primary:           #1e293b;
    --nmdp-primary-light:     #334155;
    --nmdp-primary-dark:      #0f172a;
    --nmdp-topbar-bg:         #1e293b;
    --nmdp-topbar-text:       #ffffff;
    --nmdp-sidebar-bg:        #f1f5f9;
    --nmdp-sidebar-text:      #1e293b;
    --nmdp-sidebar-hover-bg:  #e2e8f0;
    --nmdp-sidebar-hover-text:#0f172a;
    --nmdp-active-bg:         #3b82f6;
    --nmdp-active-text:       #ffffff;
    --nmdp-site-bg:           #f8fafc;
    --nmdp-submenu-bg:        #f1f5f9;
    --nmdp-accent:            #3b82f6;
}

/* Есен */
.nmdp-autumn, html.nmdp-autumn {
    --nmdp-primary:           #e65100;
    --nmdp-primary-light:     #ef6c00;
    --nmdp-primary-dark:      #bf360c;
    --nmdp-topbar-bg:         #e65100;
    --nmdp-topbar-text:       #ffffff;
    --nmdp-sidebar-bg:        #fff3e0;
    --nmdp-sidebar-text:      #3e2723;
    --nmdp-sidebar-hover-bg:  #bf360c;
    --nmdp-sidebar-hover-text:#ffffff;
    --nmdp-active-bg:         #ffb300;
    --nmdp-active-text:       #ffffff;
    --nmdp-site-bg:           #fff8f0;
    --nmdp-submenu-bg:        #ffe0b2;
    --nmdp-accent:            #ffb300;
}

/* Океан */
.nmdp-ocean, html.nmdp-ocean {
    --nmdp-primary:           #0277bd;
    --nmdp-primary-light:     #0288d1;
    --nmdp-primary-dark:      #01579b;
    --nmdp-topbar-bg:         #0277bd;
    --nmdp-topbar-text:       #ffffff;
    --nmdp-sidebar-bg:        #e1f5fe;
    --nmdp-sidebar-text:      #01344f;
    --nmdp-sidebar-hover-bg:  #01579b;
    --nmdp-sidebar-hover-text:#ffffff;
    --nmdp-active-bg:         #0097a7;
    --nmdp-active-text:       #ffffff;
    --nmdp-site-bg:           #f0f9ff;
    --nmdp-submenu-bg:        #b3e5fc;
    --nmdp-accent:            #0097a7;
}

/* Виолетова */
.nmdp-violet, html.nmdp-violet {
    --nmdp-primary:           #6a1b9a;
    --nmdp-primary-light:     #7b1fa2;
    --nmdp-primary-dark:      #4a148c;
    --nmdp-topbar-bg:         #6a1b9a;
    --nmdp-topbar-text:       #ffffff;
    --nmdp-sidebar-bg:        #f3e5f5;
    --nmdp-sidebar-text:      #2d0a42;
    --nmdp-sidebar-hover-bg:  #4a148c;
    --nmdp-sidebar-hover-text:#ffffff;
    --nmdp-active-bg:         #8e24aa;
    --nmdp-active-text:       #ffffff;
    --nmdp-site-bg:           #faf0ff;
    --nmdp-submenu-bg:        #e1bee7;
    --nmdp-accent:            #8e24aa;
}

/* ============================================================
   ГЛОБАЛНИ РЕЗЕТИ
   ============================================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--nmdp-site-bg);
    color: #1e293b;
    line-height: 1.6;
    transition: background-color 0.3s ease;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--nmdp-primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover { opacity: 0.8; }

img { max-width: 100%; height: auto; display: block; }

button { font-family: inherit; cursor: pointer; }

/* ============================================================
   ЛЕЈАУТ
   ============================================================ */

.nmdp-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background-color: var(--nmdp-sidebar-bg);
    color: var(--nmdp-sidebar-text);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    transition: left 0.3s ease, background-color 0.3s ease, width 0.3s ease;
    box-shadow: 2px 0 8px rgba(0,0,0,0.06);
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.1) transparent;
}

.nmdp-sidebar::-webkit-scrollbar { width: 4px; }
.nmdp-sidebar::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 2px; }

.nmdp-topbar {
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    height: 60px;
    background-color: var(--nmdp-topbar-bg);
    color: var(--nmdp-topbar-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    transition: left 0.3s ease, background-color 0.3s ease;
}

.nmdp-main-content {
    margin-left: 260px;
    margin-top: 60px;
    padding: 28px;
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

/* ============================================================
   САЈДБАР — ХЕДЕР / ЛОГО
   ============================================================ */

.nmdp-sidebar-header {
    padding: 20px 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.07);
    flex-shrink: 0;
}

.nmdp-sidebar-logo-img {
    width: 68px;
    height: 68px;
    border-radius: 14px;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.25);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.nmdp-sidebar-logo-text {
    font-size: 16px;
    font-weight: 800;
    color: var(--nmdp-sidebar-text);
    text-align: center;
    line-height: 1.2;
}

.nmdp-sidebar-logo-tagline {
    font-size: 11px;
    color: var(--nmdp-sidebar-text);
    opacity: 0.55;
    text-align: center;
    font-weight: 400;
}

/* ============================================================
   НАВИГАЦИЈА
   ============================================================ */

.nmdp-sidebar-nav { flex: 1; }

.nmdp-sidebar-menu,
.nmdp-sidebar-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nmdp-sidebar-menu { padding: 12px 0; }

.nmdp-sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    color: var(--nmdp-sidebar-text);
    font-size: 14px;
    font-weight: 500;
    border-radius: 0;
    transition: background-color 0.18s ease, color 0.18s ease;
    position: relative;
}

.nmdp-sidebar-menu a:hover {
    background-color: var(--nmdp-sidebar-hover-bg);
    color: var(--nmdp-sidebar-hover-text);
    opacity: 1;
}

.nmdp-sidebar-menu .current-menu-item > a,
.nmdp-sidebar-menu .current-menu-ancestor > a {
    background-color: var(--nmdp-active-bg);
    color: var(--nmdp-active-text);
    font-weight: 700;
    border-radius: 0 25px 25px 0;
    margin-right: 14px;
}

/* Подменија */
.nmdp-sidebar-menu .sub-menu {
    background-color: var(--nmdp-submenu-bg);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0,0,0.2,1);
}

.nmdp-sidebar-menu .sub-menu a {
    padding-left: 48px;
    font-size: 13px;
    font-weight: 400;
}

.nmdp-sidebar-menu .menu-item-has-children > a::after {
    content: '▾';
    margin-left: auto;
    font-size: 11px;
    transition: transform 0.3s ease;
    opacity: 0.6;
}

.nmdp-sidebar-menu .menu-item-has-children.nmdp-submenu-open > a::after {
    transform: rotate(180deg);
}

.nmdp-sidebar-menu .menu-item-has-children.nmdp-submenu-open > .sub-menu {
    max-height: 600px;
}

/* Dashicon икони за мени */
.nmdp-sidebar-menu li[class*="menu-icon-"] > a::before {
    font-family: dashicons;
    speak: never;
    font-style: normal;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    font-size: 18px;
    width: 20px;
    flex-shrink: 0;
    color: inherit;
}

.nmdp-sidebar-menu li.menu-icon-home > a::before           { content: "\f102"; }
.nmdp-sidebar-menu li.menu-icon-dashboard > a::before      { content: "\f226"; }
.nmdp-sidebar-menu li.menu-icon-settings > a::before       { content: "\f111"; }
.nmdp-sidebar-menu li.menu-icon-users > a::before          { content: "\f307"; }
.nmdp-sidebar-menu li.menu-icon-user > a::before           { content: "\f110"; }
.nmdp-sidebar-menu li.menu-icon-groups > a::before         { content: "\f484"; }
.nmdp-sidebar-menu li.menu-icon-documents > a::before      { content: "\f107"; }
.nmdp-sidebar-menu li.menu-icon-folder > a::before         { content: "\f318"; }
.nmdp-sidebar-menu li.menu-icon-bell > a::before           { content: "\f227"; }
.nmdp-sidebar-menu li.menu-icon-list > a::before           { content: "\f163"; }
.nmdp-sidebar-menu li.menu-icon-stats > a::before          { content: "\f239"; }
.nmdp-sidebar-menu li.menu-icon-calendar > a::before       { content: "\f145"; }
.nmdp-sidebar-menu li.menu-icon-mail > a::before           { content: "\f466"; }
.nmdp-sidebar-menu li.menu-icon-lock > a::before           { content: "\f160"; }
.nmdp-sidebar-menu li.menu-icon-tools > a::before          { content: "\f107"; }
.nmdp-sidebar-menu li.menu-icon-shield > a::before         { content: "\f332"; }
.nmdp-sidebar-menu li.menu-icon-chart-bar > a::before      { content: "\f238"; }
.nmdp-sidebar-menu li.menu-icon-cloud > a::before          { content: "\f176"; }
.nmdp-sidebar-menu li.menu-icon-edit > a::before           { content: "\f464"; }
.nmdp-sidebar-menu li.menu-icon-plus > a::before           { content: "\f132"; }
.nmdp-sidebar-menu li.menu-icon-trash > a::before          { content: "\f182"; }
.nmdp-sidebar-menu li.menu-icon-tag > a::before            { content: "\f323"; }
.nmdp-sidebar-menu li.menu-icon-info > a::before           { content: "\f348"; }
.nmdp-sidebar-menu li.menu-icon-warning > a::before        { content: "\f534"; }
.nmdp-sidebar-menu li.menu-icon-money > a::before          { content: "\f524"; }
.nmdp-sidebar-menu li.menu-icon-media > a::before          { content: "\f104"; }
.nmdp-sidebar-menu li.menu-icon-location > a::before       { content: "\f231"; }
.nmdp-sidebar-menu li.menu-icon-megaphone > a::before      { content: "\f488"; }

/* ============================================================
   САЈДБАР — КОРИСНИК ВО ДНОТО
   ============================================================ */

.nmdp-sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-top: 1px solid rgba(0,0,0,0.07);
    flex-shrink: 0;
    background: rgba(0,0,0,0.03);
}

.nmdp-sidebar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--nmdp-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.nmdp-sidebar-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nmdp-sidebar-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.nmdp-sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--nmdp-sidebar-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nmdp-sidebar-user-role {
    font-size: 11px;
    color: var(--nmdp-sidebar-text);
    opacity: 0.55;
}

/* ============================================================
   ТОПБАР — ЕЛЕМЕНТИ
   ============================================================ */

.nmdp-topbar-left,
.nmdp-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nmdp-toggle-btn {
    background: rgba(255,255,255,0.12);
    border: none;
    color: var(--nmdp-topbar-text);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.nmdp-toggle-btn:hover { background: rgba(255,255,255,0.22); }

.nmdp-toggle-btn .dashicons { font-size: 22px; width: 22px; height: 22px; }

.nmdp-page-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--nmdp-topbar-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

/* Топбар копче за логин */
.nmdp-topbar-login-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(255,255,255,0.15);
    color: var(--nmdp-topbar-text);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.nmdp-topbar-login-btn:hover { background: rgba(255,255,255,0.25); opacity: 1; }

/* ============================================================
   ТОПБАР ВИЏЕТИ
   ============================================================ */

.nmdp-topbar-widgets-area {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nmdp-topbar-widget-item {
    position: relative;
    display: flex;
    align-items: center;
}

.nmdp-widget-trigger-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(255,255,255,0.12);
    border: none;
    color: var(--nmdp-topbar-text);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    position: relative;
}

.nmdp-widget-trigger-btn:hover { background: rgba(255,255,255,0.22); }
.nmdp-widget-trigger-btn .dashicons { font-size: 18px; width: 18px; height: 18px; }

/* Dropdown содржина на виџетот */
.nmdp-topbar-widget-item > *:not(.nmdp-widget-trigger-btn):not(.nmdp-notif-badge) {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.14);
    border: 1px solid rgba(0,0,0,0.07);
    z-index: 1100;
    min-width: 240px;
    padding: 14px;
    color: #374151;
}

.nmdp-topbar-widget-item.nmdp-widget-open > *:not(.nmdp-widget-trigger-btn):not(.nmdp-notif-badge) {
    display: block;
    animation: nmdpFadeDown 0.2s ease;
}

/* ============================================================
   ИЗВЕСТУВАЊА — ЅВОНЧЕ
   ============================================================ */

.nmdp-notif-widget { position: relative; }

.nmdp-notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    background: #ef4444;
    color: #fff;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--nmdp-topbar-bg);
    line-height: 1;
}

.nmdp-notif-badge.nmdp-badge-hidden { display: none; }

.nmdp-notif-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 340px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.14);
    border: 1px solid rgba(0,0,0,0.07);
    z-index: 1100;
    overflow: hidden;
}

.nmdp-notif-dropdown.nmdp-dropdown-open {
    display: block;
    animation: nmdpFadeDown 0.2s ease;
}

.nmdp-notif-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 12px;
    border-bottom: 1px solid #f1f5f9;
}

.nmdp-notif-dropdown-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.nmdp-notif-mark-all {
    background: none;
    border: none;
    font-size: 12px;
    color: var(--nmdp-primary);
    cursor: pointer;
    font-weight: 500;
    transition: opacity 0.2s;
}

.nmdp-notif-mark-all:hover { opacity: 0.7; }

.nmdp-notif-dropdown-list {
    max-height: 320px;
    overflow-y: auto;
}

.nmdp-notif-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f8fafc;
    transition: background 0.15s ease;
    cursor: pointer;
}

.nmdp-notif-item:hover { background: #f8fafc; }
.nmdp-notif-item.nmdp-unread { background: #eff6ff; }
.nmdp-notif-item.nmdp-unread:hover { background: #dbeafe; }

.nmdp-notif-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nmdp-notif-icon .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.nmdp-notif-body { flex: 1; min-width: 0; }

.nmdp-notif-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nmdp-notif-msg {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nmdp-notif-time {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 4px;
}

.nmdp-notif-dropdown-footer {
    padding: 12px 16px;
    text-align: center;
    border-top: 1px solid #f1f5f9;
}

.nmdp-notif-dropdown-footer a {
    font-size: 13px;
    color: var(--nmdp-primary);
    font-weight: 500;
}

/* ============================================================
   ПРОФИЛ DROPDOWN
   ============================================================ */

.nmdp-profile-wrapper { position: relative; }

.nmdp-avatar-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: var(--nmdp-topbar-text);
    border: 2px solid rgba(255,255,255,0.4);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
    font-family: inherit;
}

.nmdp-avatar-btn:hover {
    background: rgba(255,255,255,0.32);
    border-color: rgba(255,255,255,0.7);
}

.nmdp-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.nmdp-profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 256px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.14);
    border: 1px solid rgba(0,0,0,0.07);
    z-index: 1100;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nmdp-profile-dropdown.nmdp-dropdown-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.nmdp-dropdown-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

.nmdp-dropdown-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--nmdp-primary);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

.nmdp-dropdown-user-info { flex: 1; min-width: 0; }

.nmdp-dropdown-name {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nmdp-dropdown-role { font-size: 12px; color: #6b7280; margin-top: 1px; }

.nmdp-dropdown-divider { height: 1px; background: #f1f5f9; margin: 2px 0; }

.nmdp-dropdown-section-label {
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 10px 16px 6px;
}

.nmdp-dropdown-palette {
    display: flex;
    gap: 8px;
    padding: 6px 16px 12px;
    flex-wrap: wrap;
}

.nmdp-palette-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.nmdp-palette-dot:hover { transform: scale(1.2); }
.nmdp-palette-dot.nmdp-palette-active { border-color: #1a1a1a; transform: scale(1.15); }

.nmdp-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 14px;
    color: #374151;
    text-decoration: none;
    transition: background 0.15s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.nmdp-dropdown-item:hover { background: #f9fafb; color: #111827; opacity: 1; }

.nmdp-dropdown-item .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: #6b7280;
    flex-shrink: 0;
}

.nmdp-dropdown-logout { color: #dc2626; border-radius: 0 0 14px 14px; }
.nmdp-dropdown-logout:hover { background: #fef2f2; color: #b91c1c; }
.nmdp-dropdown-logout .dashicons { color: #dc2626; }

/* ============================================================
   КОЛАПС НА САЈДБАР
   ============================================================ */

body.nmdp-sidebar-collapsed .nmdp-sidebar { left: -260px; }
body.nmdp-sidebar-collapsed .nmdp-topbar  { left: 0; }
body.nmdp-sidebar-collapsed .nmdp-main-content { margin-left: 0; }

/* ============================================================
   FOOTER
   ============================================================ */

.nmdp-footer {
    margin-top: auto;
    padding-top: 24px;
}

.nmdp-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-top: 1px solid rgba(0,0,0,0.07);
    gap: 16px;
    flex-wrap: wrap;
}

.nmdp-footer-text {
    font-size: 13px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nmdp-footer-version {
    font-size: 11px;
    background: #f1f5f9;
    color: #64748b;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.nmdp-footer-socials { display: flex; gap: 10px; align-items: center; }

.nmdp-footer-social-link {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

.nmdp-footer-social-link:hover {
    background: var(--nmdp-primary);
    color: #fff;
    opacity: 1;
}

.nmdp-footer-social-link .dashicons { font-size: 16px; width: 16px; height: 16px; }

/* ============================================================
   ADMIN BAR КОМПАТИБИЛНОСТ
   ============================================================ */

.admin-bar .nmdp-topbar  { top: 32px; }
.admin-bar .nmdp-sidebar { top: 32px; height: calc(100vh - 32px); }
.admin-bar .nmdp-main-content { margin-top: 92px; }

@media screen and (max-width: 782px) {
    .admin-bar .nmdp-topbar  { top: 46px; }
    .admin-bar .nmdp-sidebar { top: 46px; height: calc(100vh - 46px); }
    .admin-bar .nmdp-main-content { margin-top: 106px; }
}

/* ============================================================
   МОБИЛЕН ПРИКАЗ
   ============================================================ */

.nmdp-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 998;
    backdrop-filter: blur(2px);
}

@media (max-width: 768px) {
    .nmdp-topbar       { left: 0; }
    .nmdp-sidebar      { left: -260px; }
    .nmdp-main-content { margin-left: 0; padding: 16px; }

    body.nmdp-sidebar-mobile-open .nmdp-sidebar         { left: 0; }
    body.nmdp-sidebar-mobile-open .nmdp-sidebar-overlay { display: block; }

    .nmdp-page-title { max-width: 180px; font-size: 14px; }
}

/* ============================================================
   АНИМАЦИИ
   ============================================================ */

@keyframes nmdpFadeDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes nmdpFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes nmdpSlideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.nmdp-spin { animation: spin 1s linear infinite; display: inline-block; }

/* ============================================================
   ЗАЕДНИЧКИ UI КОМПОНЕНТИ
   ============================================================ */

/* Картички */
.nmdp-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    animation: nmdpSlideUp 0.35s ease both;
}

/* Статус беџови */
.nmdp-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.nmdp-badge-success { background: #f0fdf4; color: #16a34a; }
.nmdp-badge-error   { background: #fef2f2; color: #dc2626; }
.nmdp-badge-warning { background: #fffbeb; color: #d97706; }
.nmdp-badge-info    { background: #eff6ff; color: #2563eb; }

/* Копчиња */
.nmdp-btn,
.nmdp-admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.nmdp-btn-primary {
    background: var(--nmdp-primary);
    color: #fff;
}
.nmdp-btn-primary:hover { background: var(--nmdp-primary-light); opacity: 1; color: #fff; }

.nmdp-btn-outline {
    background: transparent;
    color: var(--nmdp-primary);
    border: 1.5px solid var(--nmdp-primary);
}
.nmdp-btn-outline:hover { background: var(--nmdp-primary); color: #fff; opacity: 1; }

.nmdp-btn-danger {
    background: #dc2626;
    color: #fff;
}
.nmdp-btn-danger:hover { background: #b91c1c; opacity: 1; color: #fff; }

.nmdp-btn-success {
    background: #16a34a;
    color: #fff;
}
.nmdp-btn-success:hover { background: #15803d; opacity: 1; color: #fff; }

.nmdp-btn-sm, .nmdp-btn-outline-sm {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    cursor: pointer;
    border: 1.5px solid var(--nmdp-primary);
    color: var(--nmdp-primary);
    background: transparent;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: inherit;
}
.nmdp-btn-sm:hover, .nmdp-btn-outline-sm:hover { background: var(--nmdp-primary); color: #fff; opacity: 1; }

.nmdp-btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #64748b;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    transition: color 0.15s, background 0.15s;
}
.nmdp-btn-icon:hover { color: var(--nmdp-primary); background: #f1f5f9; }

/* Форма елементи */
.nmdp-input {
    width: 100%;
    padding: 9px 13px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}
.nmdp-input:focus {
    outline: none;
    border-color: var(--nmdp-primary);
    box-shadow: 0 0 0 3px rgba(30,58,138,0.1);
}

.nmdp-textarea {
    width: 100%;
    padding: 9px 13px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.2s ease;
}
.nmdp-textarea:focus {
    outline: none;
    border-color: var(--nmdp-primary);
    box-shadow: 0 0 0 3px rgba(30,58,138,0.1);
}

.nmdp-select {
    padding: 9px 13px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
}
.nmdp-select:focus { outline: none; border-color: var(--nmdp-primary); }

.nmdp-select-sm { padding: 5px 10px; font-size: 13px; border-radius: 6px; }

/* Toggle switch */
.nmdp-toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.nmdp-toggle input { opacity: 0; width: 0; height: 0; }
.nmdp-toggle-slider {
    position: absolute;
    inset: 0;
    background: #cbd5e1;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.3s ease;
}
.nmdp-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    left: 3px;
    top: 3px;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.nmdp-toggle input:checked + .nmdp-toggle-slider { background: var(--nmdp-primary); }
.nmdp-toggle input:checked + .nmdp-toggle-slider::before { transform: translateX(20px); }

/* Loading */
.nmdp-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px;
    color: #94a3b8;
    font-size: 14px;
}

/* Empty state */
.nmdp-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 14px;
    text-align: center;
}

/* Inline порака */
.nmdp-inline-msg {
    font-size: 13px;
    font-weight: 500;
    display: none;
}

/* Error msg */
.nmdp-error-msg {
    padding: 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    color: #991b1b;
    font-size: 14px;
}