/* sidebar.css — макет бічної навігаційної панелі (замінює верхню nav) */

#appSidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 260px; min-width: 180px; max-width: 420px;
    background: #111214; border-right: 1px solid #232428;
    display: flex; flex-direction: column;
    z-index: 500;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

#appSidebar .sb-header {
    padding: 20px 18px 14px;
    border-bottom: 1px solid #232428;
}

#appSidebar .sb-project-name {
    font-size: 17px; font-weight: 800; color: #fff;
    display: flex; align-items: center; gap: 8px;
}

#appSidebar .sb-user-line {
    margin-top: 10px; font-size: 13px; color: #999;
}

#appSidebar .sb-user-line strong { color: #ddd; }

#appSidebar .sb-balance-row {
    margin: 14px 18px; display: flex; align-items: center; gap: 8px;
}

#appSidebar .sb-wallet-icon-btn {
    flex-shrink: 0; width: 38px; height: 38px; border-radius: 10px;
    background: #1c1c1e; border: 1px solid #2a2a2c; color: #999;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; transition: color .15s, border-color .15s;
}

#appSidebar .sb-wallet-icon-btn:hover { color: #0a84ff; border-color: #0a84ff; }

#appSidebar .sb-balance-block {
    flex: 1; padding: 10px 12px;
    background: #1c1c1e; border-radius: 12px;
    display: flex; align-items: center; justify-content: space-between;
    min-width: 0;
}

#appSidebar .sb-balance-value { color: #fff; font-size: 14px; font-weight: 700; }
#appSidebar .sb-balance-label { color: #777; font-size: 10px; margin-top: 2px; }

#appSidebar .sb-balance-plus {
    width: 24px; height: 24px; border-radius: 50%; background: #0a84ff;
    color: #fff; border: none; font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; padding: 0;
    flex-shrink: 0;
}

#appSidebar .sb-nav {
    flex: 1; overflow-y: auto; padding: 10px 10px;
}

#appSidebar .sb-link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: 10px;
    color: #aaa; text-decoration: none; font-size: 14px;
    margin-bottom: 2px; transition: background .15s, color .15s;
}

#appSidebar .sb-link:hover { background: #1c1c1e; color: #fff; }
#appSidebar .sb-link.active { background: #0a84ff; color: #fff; }

#appSidebar .sb-section-label {
    font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
    color: #555; padding: 14px 12px 4px;
}

#appSidebar .sb-sublink {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px 8px 26px; border-radius: 10px;
    color: #999; text-decoration: none; font-size: 13px;
    margin-bottom: 1px; transition: background .15s, color .15s;
}

#appSidebar .sb-sublink:hover { background: #1c1c1e; color: #fff; }
#appSidebar .sb-sublink.active { background: #17324f; color: #6ab6ff; }

#appSidebar .sb-social-links {
    display: flex; gap: 8px; padding: 12px;
    border-top: 1px solid #232428; border-bottom: 1px solid #232428;
}

#appSidebar .sb-social-btn {
    display: flex; align-items: center; justify-content: center;
    flex: 1; height: 40px; border-radius: 10px;
    background: #1c1c1e; transition: background .15s;
}

#appSidebar .sb-social-btn:hover { background: #17324f; }

#appSidebar .sb-footer {
    padding: 10px;
}

#appSidebar .sb-lang-switcher {
    display: flex; gap: 5px; padding: 10px 12px 6px;
}

#appSidebar .sb-lang-switcher a {
    padding: 5px 11px; border-radius: 7px; font-size: 12px; font-weight: 700;
    color: #777; text-decoration: none;
}

#appSidebar .sb-lang-switcher a.active { background: #0a84ff; color: #fff; }

#appSidebar .sb-resize-handle {
    position: absolute; top: 0; right: -3px; bottom: 0; width: 6px;
    cursor: col-resize; z-index: 501;
}

#appSidebar .sb-resize-handle:hover,
#appSidebar .sb-resize-handle.dragging {
    background: rgba(10, 132, 255, 0.4);
}

/* Зсуваємо основний контент праворуч від панелі */
body.has-sidebar {
    padding-left: var(--sidebar-width, 260px);
    transition: padding-left .05s;
}

body.has-sidebar nav {
    display: none !important;
}

@media (max-width: 860px) {
    #appSidebar { transform: translateX(-100%); transition: transform .2s; }
    #appSidebar.sb-open { transform: translateX(0); }
    body.has-sidebar { padding-left: 0 !important; }
    #sbMobileToggle {
        position: fixed; top: 14px; left: 14px; z-index: 502;
        width: 40px; height: 40px; border-radius: 10px;
        background: #1c1c1e; border: 1px solid #333; color: #fff;
        font-size: 18px; display: flex; align-items: center; justify-content: center;
    }
}