/* ============================================================
   LumenFlow — Sidebar / Nav Rail
   Loaded AFTER page <style> blocks to win the cascade.
   Standardises sidebar appearance across all MPA pages.
   ============================================================ */

/* ---------- Container ---------- */
.sidebar {
    width: 64px;
    background: rgba(5, 5, 5, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0 20px;
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 1000;
}

/* Iridescent edge glow — full gradient, consistent across all pages */
.sidebar::after {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 1px;
    background: linear-gradient(
        180deg,
        transparent       0%,
        rgba(174,255,0,  0.55) 20%,
        rgba(0,  229,255, 0.55) 50%,
        rgba(255,32, 121, 0.45) 78%,
        transparent      100%
    );
    pointer-events: none;
}

/* ---------- Logo ---------- */
.sidebar .logo {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    background-image: url('./source/logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-bottom: 24px;
    cursor: pointer;
    display: block;
    border: none;
    box-shadow: none;
}

/* ---------- Nav container ---------- */
.nav-icons {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    align-items: center;
    flex: 1;
}

/* ---------- Nav item — unified 44 × 44 px ---------- */
.nav-item {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.32);
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
    position: relative;
    text-decoration: none;
    border: 1px solid transparent;
    background: transparent;
    box-shadow: none;
}

.nav-item span {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1;
    font-family: 'Outfit', 'Noto Sans SC', system-ui, sans-serif;
}

/* Hover */
.nav-item:hover {
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.80);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

/* Active — lime tint, single color, no cyan conflict */
.nav-item.active {
    background: rgba(174, 255, 0, 0.10);
    color: #AEFF00;
    border-color: rgba(174, 255, 0, 0.22);
    box-shadow: 0 0 16px rgba(174, 255, 0, 0.12);
}

.nav-item.active:hover {
    background: rgba(174, 255, 0, 0.14);
    color: #AEFF00;
    border-color: rgba(174, 255, 0, 0.30);
}

/* Toolbox flyout open state — same lime as .active */
.nav-item.toolbox-active {
    background: rgba(174, 255, 0, 0.10);
    color: #AEFF00;
    border-color: rgba(174, 255, 0, 0.22);
    box-shadow: 0 0 16px rgba(174, 255, 0, 0.12);
}

/* ---------- Avatar ---------- */
.user-avatar,
.user-avatar-side {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    background-image: url('./source/avatar.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    border: 1.5px solid rgba(255, 255, 255, 0.16);
    box-shadow: none;
    margin-top: auto;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    display: block;
}

.user-avatar:hover,
.user-avatar-side:hover {
    border-color: #AEFF00;
    box-shadow: 0 0 0 3px rgba(174, 255, 0, 0.14);
}

/* ---------- Toolbox flyout cards ---------- */
.tb-tool-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    padding: 14px 8px 12px;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    text-align: center;
}

.tb-tool-card:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(174, 255, 0, 0.28);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28);
}

.tb-tool-card.tb-disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.tb-tool-card.tb-disabled:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.09);
    transform: none;
    box-shadow: none;
}

.tb-tool-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tb-tool-name {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.3;
}
