/* main_nav.css */

.app-shell {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
}

.app-shell .page-content {
    flex: 1;
    min-width: 0;
}

.main-nav {
    width: 224px;
    min-height: 100vh;
    background: rgba(13, 13, 13, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    padding: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

/* ── Brand: logo iAgents Hub ── */
.nav-brand {
    display: flex;
    align-items: center;
    padding: 22px 18px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    text-decoration: none;
}

.nav-logo-mark {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
}

.nav-logo-iagents {
    font-size: 1rem;
    font-weight: 700;
    color: #f0f0f0;
    letter-spacing: -0.025em;
    font-family: "Inter", system-ui, sans-serif;
}

.nav-logo-hub {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: #CC2020;
    border-radius: 6px;
    padding: 0.06em 0.3em 0.1em;
    letter-spacing: -0.02em;
    font-family: "Inter", system-ui, sans-serif;
}

/* ── Nav links ── */
.nav-section {
    padding: 12px 8px 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-link-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    opacity: 0.5;
}

.nav-link.active .nav-link-icon {
    opacity: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    color: rgba(240, 240, 240, 0.45);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.12s, color 0.12s;
    margin-bottom: 1px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(240, 240, 240, 0.85);
}

.nav-link.active {
    background: rgba(204, 32, 32, 0.12);
    color: #CC2020;
}

.nav-link svg {
    opacity: 0.7;
    flex-shrink: 0;
}

.nav-link.active svg {
    opacity: 1;
}

.nav-spacer {
    flex: 1;
}

.nav-admin-section {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.2);
    padding: 4px 10px 6px;
}

/* ── Footer: user ── */
.nav-footer {
    padding: 12px 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    color: rgba(240, 240, 240, 0.4);
    font-size: 12px;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    border: none;
    background: none;
    width: 100%;
    font-family: var(--font);
    text-align: left;
}

.nav-user:hover {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(240, 240, 240, 0.75);
}

.nav-logout-icon {
    margin-left: auto;
    opacity: 0.3;
    flex-shrink: 0;
}

.nav-user:hover .nav-logout-icon {
    opacity: 0.7;
}

.nav-theme-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    color: var(--ink-2);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    border: none;
    background: none;
    width: 100%;
    font-family: var(--font);
    text-align: left;
    margin-bottom: 4px;
}

.nav-theme-btn:hover {
    background: var(--surface-2);
    color: var(--ink);
}

.nav-user-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(204, 32, 32, 0.15);
    color: #CC2020;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    border: 1px solid rgba(204, 32, 32, 0.25);
}

/* ── Lang switcher ── */
.nav-lang-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
    background: none;
    border: none;
    color: var(--ink-3);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    padding: 5px 16px;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
    margin-bottom: 4px;
}

.nav-lang-btn:hover {
    color: var(--ink-1);
    background: rgba(255, 255, 255, 0.05);
}