/* 공통 메뉴 줄 — templates/_nav.html */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: hsl(var(--background, 0 0% 100%));
    border-bottom: 1px solid hsl(var(--border, 214.3 31.8% 91.4%));
}

.top-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.top-nav-brand {
    font-weight: 700;
    font-size: 0.95rem;
    color: hsl(var(--foreground, 222.2 84% 4.9%));
    text-decoration: none;
    white-space: nowrap;
}

.top-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
}

.top-nav-link {
    padding: 6px 12px;
    border-radius: var(--radius, 0.5rem);
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground, 215.4 16.3% 46.9%));
    text-decoration: none;
    white-space: nowrap;
}

a.top-nav-link:hover {
    background: hsl(var(--muted, 210 40% 96.1%));
    color: hsl(var(--foreground, 222.2 84% 4.9%));
}

.top-nav-link.is-active {
    background: hsl(var(--secondary, 210 40% 96.1%));
    color: hsl(var(--foreground, 222.2 84% 4.9%));
    font-weight: 600;
}

.top-nav-link.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.top-nav-user {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.top-nav-username {
    font-size: 0.8rem;
    color: hsl(var(--muted-foreground, 215.4 16.3% 46.9%));
}

.top-nav-user form {
    margin: 0;
}

.top-nav-logout {
    padding: 6px 12px;
    font-size: 0.8rem;
    font-family: inherit;
    border: 1px solid hsl(var(--border, 214.3 31.8% 91.4%));
    border-radius: var(--radius, 0.5rem);
    background: transparent;
    color: hsl(var(--foreground, 222.2 84% 4.9%));
    cursor: pointer;
}

.top-nav-logout:hover {
    background: hsl(var(--muted, 210 40% 96.1%));
}

@media (max-width: 640px) {
    .top-nav-inner {
        gap: 12px;
        padding: 0 12px;
    }

    .top-nav-brand {
        display: none;
    }

    .top-nav-username {
        display: none;
    }
}
