/* Shared top navigation + user menu for the portal (static pages and Razor layout). */
.pn-navbar {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 60%, #3730a3 100%);
    box-shadow: 0 4px 12px -2px rgba(55, 48, 163, 0.35);
    margin-bottom: 1.5rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}
.pn-inner { display: flex; align-items: center; gap: 1.5rem; padding: 0.7rem 1.5rem; max-width: 100%; }
.pn-brand { display: flex; align-items: center; gap: 0.6rem; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; white-space: nowrap; }
.pn-brand:hover { color: #fff; }
.pn-brand-logo { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,0.18); display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem; }
.pn-links { display: flex; gap: 0.25rem; flex: 1; flex-wrap: wrap; }
.pn-links a { color: rgba(255,255,255,0.82); text-decoration: none; padding: 0.45rem 0.9rem; border-radius: 8px; font-weight: 500; font-size: 0.92rem; transition: background .15s, color .15s; }
.pn-links a:hover { color: #fff; background: rgba(255,255,255,0.12); }
.pn-links a.active { color: #fff; background: rgba(255,255,255,0.2); }

.pn-user { position: relative; margin-left: auto; }
.pn-user-btn { display: flex; align-items: center; gap: 0.6rem; background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2); color: #fff; border-radius: 999px; padding: 0.25rem 0.75rem 0.25rem 0.3rem; cursor: pointer; transition: background .15s; }
.pn-user-btn:hover, .pn-user-btn[aria-expanded="true"] { background: rgba(255,255,255,0.22); }
.pn-avatar { width: 34px; height: 34px; border-radius: 50%; background: #fff; color: #4338ca; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; flex-shrink: 0; }
.pn-avatar.lg { width: 44px; height: 44px; font-size: 1.05rem; background: #eef2ff; }
.pn-user-name { font-weight: 600; font-size: 0.9rem; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-chevron { font-size: 0.7rem; opacity: 0.8; }

.pn-menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 280px; background: #fff; color: #111827; border-radius: 14px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2), 0 8px 10px -6px rgba(0,0,0,0.15); padding: 0.5rem; z-index: 1050; display: none; }
.pn-menu.open { display: block; }
.pn-menu-head { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0.75rem 0.85rem; border-bottom: 1px solid #f3f4f6; margin-bottom: 0.4rem; }
.pn-menu-head .who { min-width: 0; }
.pn-menu-head .who .n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-menu-head .who .e { font-size: 0.8rem; color: #6b7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pn-role { display: inline-block; margin-top: 0.25rem; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; background: #e0e7ff; color: #3730a3; border-radius: 6px; padding: 0.15rem 0.5rem; }
.pn-menu a, .pn-menu button.pn-item { display: flex; align-items: center; gap: 0.7rem; width: 100%; padding: 0.55rem 0.75rem; border: 0; background: none; border-radius: 8px; color: #374151; text-decoration: none; font-size: 0.92rem; text-align: left; cursor: pointer; }
.pn-menu a:hover, .pn-menu button.pn-item:hover { background: #f3f4f6; color: #111827; }
.pn-menu i { color: #6b7280; font-size: 1.05rem; width: 1.2rem; text-align: center; }
.pn-menu hr { margin: 0.4rem 0; border-color: #f3f4f6; opacity: 1; }
.pn-menu .pn-danger, .pn-menu .pn-danger i { color: #b91c1c; }
.pn-menu .pn-danger:hover { background: #fef2f2; }

.pn-page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }
.pn-page-head h1 { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.025em; color: #111827; margin: 0; }
.pn-page-head p { margin: 0.2rem 0 0; color: #6b7280; }

@media (max-width: 640px) {
    .pn-user-name, .pn-chevron { display: none; }
    .pn-user-btn { padding: 0.25rem; }
    .pn-inner { gap: 0.75rem; padding: 0.6rem 1rem; }
    .pn-brand-text { display: none; }
}
@media print { .pn-navbar { display: none; } }
