/* Profile navigation for facility viewer and administrator map pages. */
header.profile-topbar { box-sizing:border-box;position:relative;z-index:40;display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:12px;min-height:calc(72px + env(safe-area-inset-top,0px));padding:calc(10px + env(safe-area-inset-top,0px)) max(14px,env(safe-area-inset-right,0px)) 10px max(14px,env(safe-area-inset-left,0px));background:#0f172a;color:#fff;font-family:system-ui,-apple-system,"Segoe UI",sans-serif;line-height:1.4; }
header.profile-topbar * { box-sizing:border-box; }
header.profile-topbar .brand { display:flex;align-items:center;gap:12px;color:#fff;text-decoration:none; }
header.profile-topbar .brand h1 { margin:0;font-family:inherit;font-size:20px;font-weight:700;line-height:1.4; }
header.profile-topbar .brand p { display:block;margin:4px 0 0;color:#cbd5e1;font-size:13px;font-weight:400;line-height:1.4; }
header.profile-topbar .brand-logo { display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;border-radius:12px;background:#2563eb;color:#fff;font-size:22px;font-weight:800; }
header.profile-topbar .profile-menu { display:block;line-height:1.4;color-scheme:light; }
header.profile-topbar .profile-menu[hidden] { display:none; }
.profile-menu button { justify-content:flex-start; }
.app-layout .profile-topbar { position:relative;display:flex;flex-wrap:nowrap;gap:12px;overflow:visible; }
.profile-topbar .brand { flex:1;min-width:0; }
.profile-topbar .brand > div:last-child { min-width:0; }
.profile-topbar .brand h1 { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.profile-dropdown { position:relative;flex:none; }
.profile-trigger { display:flex;align-items:center;gap:8px;min-height:44px;max-width:240px;padding:6px 8px;border:1px solid transparent;border-radius:9px;background:transparent;color:#fff;cursor:pointer;font-family:inherit;font-size:14px;line-height:1.4;font-weight:600; }
.profile-trigger:hover,.profile-trigger[aria-expanded=true] { background:#ffffff14;border-color:#ffffff30; }
.profile-avatar { width:30px;height:30px;flex:none; }
.profile-username { overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:170px; }
.profile-chevron { width:15px;height:15px;flex:none;transition:transform .15s; }
.profile-trigger[aria-expanded=true] .profile-chevron { transform:rotate(180deg); }
.profile-menu { position:absolute;right:0;top:calc(100% + 8px);width:210px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 90px - env(safe-area-inset-top,0px));overflow-y:auto;overscroll-behavior:contain;padding:6px;border:1px solid #dbe3ef;border-radius:12px;background:white;color:#334155;box-shadow:0 10px 28px #0f172a30;z-index:50; }
.profile-menu[hidden] { display:none; }
.profile-menu a,.profile-menu button { display:flex;align-items:center;gap:11px;width:100%;min-height:44px;padding:10px 12px;border:0;border-radius:7px;background:transparent;color:#334155;text-decoration:none;font-family:inherit;font-size:14px;line-height:1.4;font-weight:500;text-align:left;cursor:pointer; }
.profile-menu a:hover,.profile-menu button:hover,.profile-menu [aria-current=page] { background:#eff6ff;color:#1d4ed8; }
.profile-menu svg { width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round; }
.profile-menu form { margin:5px 0 0;padding:5px 0 0;border-top:1px solid #e2e8f0; }
.profile-trigger:focus-visible,.profile-menu a:focus-visible,.profile-menu button:focus-visible { outline:2px solid #60a5fa;outline-offset:1px; }
.profile-panel-toggle::before { content:'';width:18px;height:18px;flex:none;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m16 16 5 5'/%3E%3C/svg%3E") center/contain no-repeat; }
#btnTogglePanel::before { mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='m3 5 6-2 6 2 6-2v16l-6 2-6-2-6 2V5ZM9 3v16M15 5v16'/%3E%3C/svg%3E"); }
@media(max-width:900px) {
 header.profile-topbar { min-height:calc(56px + env(safe-area-inset-top,0px));padding-top:calc(6px + env(safe-area-inset-top,0px));padding-bottom:6px;gap:8px; }
 header.profile-topbar .brand { gap:8px; }
 header.profile-topbar .brand h1 { font-size:14px; }
 header.profile-topbar .brand p { display:none; }
 header.profile-topbar .brand-logo { width:28px;height:28px;flex-basis:28px;font-size:16px;border-radius:8px; }
 .app-layout .profile-topbar { min-height:calc(56px + var(--safe-area-top));padding-top:calc(6px + var(--safe-area-top));padding-bottom:6px;gap:8px; }
 .profile-topbar .profile-username,.profile-topbar .profile-chevron { display:none; }
 .profile-trigger { width:44px;height:44px;padding:7px; }
 .profile-topbar .brand h1 { font-size:14px; }
 .profile-topbar .brand-logo { width:28px;height:28px;flex-basis:28px;font-size:16px;border-radius:8px; }
 .profile-topbar .brand { gap:8px; }
 .profile-menu { top:calc(100% + 5px); }
 .app-layout .map-view-tools { right:auto;left:10px;top:10px;width:max-content;max-width:calc(100% - 20px);gap:6px;justify-content:flex-start; }
 .app-layout .map-view-tools .btn { flex:0 0 auto;width:auto;min-height:34px;padding:7px 10px;font-size:12px;line-height:18px;border-radius:8px; }
 body.route-open .map-view-tools { left:10px; }
}
