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

:root { --nh: 60px; }

body {
    margin: 0;
    padding-top: var(--nh);
    background: #f8fafc;

}

.content,
.content--compact {
    margin-top: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-top: 20px !important;  
    padding-left: 24px !important;
    padding-right: 24px !important;
    width: 100% !important;
    max-width: 1280px !important;
}

#topnav {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nh);
    z-index: 9999;
    background: #fff;
    border-bottom: 1px solid #e9ecf0;
    box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 2px 12px rgba(0,0,0,.04);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 4px;
}


.n-logo {
    display: flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    flex-shrink: 0;
    margin-right: 20px;
}
.n-logo-mark {
    width: 32px; height: 32px;
    border-radius: 9px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(99,102,241,.35);
}
.n-logo-mark svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.n-logo-text { font-size: 15px; font-weight: 800; color: #0f172a; letter-spacing: -0.4px; }
.n-logo-text span { color: #6366f1; }


.n-links {
    display: flex;
    align-items: center;
    gap: 1px;
    flex: 1;
    min-width: 0;
}


.n-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 11px;
    height: 36px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s, color .15s;
    cursor: pointer;
    border: none;
    background: transparent;
    flex-shrink: 0;
}
.n-link:hover { background: #f3f4f6; color: #111827; }
.n-link.act   { background: #eef2ff; color: #4f46e5; font-weight: 600; }
.n-link svg.ni { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.n-link svg.chev { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .5; transition: transform .2s; flex-shrink: 0; }


.n-group { position: static; flex-shrink: 0; }
.n-group .n-link.act svg.chev,
.n-group:hover .n-link svg.chev { transform: rotate(180deg); opacity: .8; }

.n-drop {
    position: fixed;
    top: var(--nh);
    left: auto;
    min-width: 210px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);
    padding: 8px 8px 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .18s, transform .18s, visibility .18s;
    z-index: 99999;
}
.n-group:hover .n-drop,
.n-group:focus-within .n-drop {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.n-drop-section {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .7px;
    text-transform: uppercase;
    color: #9ca3af;
    padding: 8px 10px 5px;
}
.n-drop-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    transition: background .12s, color .12s;
    white-space: nowrap;
}
.n-drop-item:hover { background: #f9fafb; color: #111827; }
.n-drop-item.act   { background: #eef2ff; color: #4f46e5; }
.n-drop-item svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; opacity: .65; }
.n-drop-divider { height: 1px; background: #f3f4f6; margin: 5px 2px; }

.n-beta {
    margin-left: auto;
    background: linear-gradient(135deg,#6366f1,#8b5cf6);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: .3px;
    flex-shrink: 0;
}


.n-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: auto;
    padding-left: 16px;
}

.n-tg {
    width: 34px; height: 34px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #6b7280;
    text-decoration: none;
    transition: all .15s;
    flex-shrink: 0;
}
.n-tg:hover { background: #f3f4f6; color: #374151; }
.n-tg svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.n-bal {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 11px;
    height: 34px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #16a34a;
    text-decoration: none;
    transition: all .15s;
    flex-shrink: 0;
    white-space: nowrap;
}
.n-bal:hover { background: #dcfce7; border-color: #86efac; }
.n-bal svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.n-user { position: static; flex-shrink: 0; }
.n-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 2px solid #e0e7ff;
    overflow: hidden;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    transition: border-color .15s;
    flex-shrink: 0;
    user-select: none;
}
.n-avatar:hover { border-color: #a5b4fc; }
.n-avatar img { width: 100%; height: 100%; object-fit: cover; }

.n-user-drop {
    position: fixed;
    top: var(--nh);
    right: 16px;
    width: 230px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,.12);
    padding: 0 8px 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .18s, transform .18s, visibility .18s;
    z-index: 99999;
}
.n-user:hover .n-user-drop,
.n-user:focus-within .n-user-drop {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.n-user-head {
    padding: 14px 10px 10px;
    border-bottom: 1px solid #f3f4f6;
    margin-bottom: 6px;
}
.n-user-name { font-size: 14px; font-weight: 700; color: #0f172a; }
.n-user-role { font-size: 11px; color: #9ca3af; margin-top: 1px; }

.n-user-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    transition: all .12s;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}
.n-user-item:hover { background: #f9fafb; color: #111827; }
.n-user-item.red:hover { background: #fff1f2; color: #dc2626; }
.n-user-item svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .6; flex-shrink: 0; }
.n-user-item .n-user-bal-pill {
    margin-left: auto;
    background: #eef2ff;
    color: #4f46e5;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
}
.n-user-div { height: 1px; background: #f3f4f6; margin: 5px 2px; }


.n-burger {
    display: none;
    width: 34px; height: 34px;
    border-radius: 8px;
    align-items: center; justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #4b5563;
    flex-shrink: 0;
}
.n-burger svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.n-mob {
    display: none;
    position: fixed;
    top: var(--nh); left: 0; right: 0;
    background: #fff;
    border-top: 1px solid #e9ecf0;
    box-shadow: 0 12px 32px rgba(0,0,0,.1);
    z-index: 9998;
    max-height: calc(100svh - var(--nh));
    overflow-y: auto;
    padding: 10px 14px 24px;
}
.n-mob.open { display: block; }
.n-mob-sec { font-size: 10px; font-weight: 700; letter-spacing: .7px; text-transform: uppercase; color: #9ca3af; padding: 12px 8px 5px; }
.n-mob-link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 8px; border-radius: 8px;
    font-size: 13px; font-weight: 500; color: #374151;
    text-decoration: none; transition: all .12s;
}
.n-mob-link:hover, .n-mob-link.act { background: #f3f4f6; color: #111827; }
.n-mob-link.act { background: #eef2ff; color: #4f46e5; }
.n-mob-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .6; flex-shrink: 0; }
.n-mob-div { height: 1px; background: #f3f4f6; margin: 6px 0; }

@media (max-width: 860px) {
    .n-links { display: none; }
    .n-burger { display: flex; }
    .n-bal span { display: none; }
    .n-bal { padding: 0 9px; }
}

.side-menu,
.viper > .side-menu { display: none !important; }
.viper::before { display: none !important; }

.content,
.content--compact {
    margin-top: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
    width: 100% !important;
    max-width: 1280px !important;
}

@media (max-width: 768px) {
    .content,
    .content--compact {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
}