/* Shared navigation for every authenticated page. */
.sidebar { background: #f1f8f8; border-right: 1px solid #d6e7e8; color: #385b66; }
.sidebar .brand { color: #173c46; overflow-wrap: anywhere; font-size: 17px; }
.sidebar .brand span { background: #206c6e; color: white; flex-shrink: 0; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.sidebar .nav-icon { display: block; flex-shrink: 0; }
.sidebar nav a:hover { background: #e0f0f0; color: #164c57; }
.sidebar nav a[aria-current="page"] { position: relative; background: #dfefef; color: #124953; font-weight: 700; }
.sidebar nav a[aria-current="page"]::before { content: ''; position: absolute; left: -7px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: #206c6e; }
.sidebar .sidebar-bottom { background: #f9fcfc; border: 1px solid #d6e7e8; }
.sidebar .sidebar-bottom small { color: #6e8790; }
.sidebar .profile-link { gap: 9px; padding: 10px; }
.profile-details { flex: 1; min-width: 0; }
.profile-details b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.profile-details small { font-size: 11px; }
.profile-settings { flex-shrink: 0; color: #6e8790; }
.sidebar .profile-link:hover, .sidebar .profile-link[aria-current="page"] { border-color: #80b8b7; }
.sidebar .avatar { background: #e5f0f1; color: #206c6e; flex-shrink: 0; }
.sidebar a:focus-visible { outline: 3px solid #80b8b7; outline-offset: 3px; }
@media (max-width: 900px) {
    .sidebar nav a { justify-content: center; }
    /* Keep the link names available to assistive technology. */
    .sidebar .nav-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
}
@media (max-width: 900px) and (min-width: 601px) {
    .sidebar .brand { font-size: 0; }
    .sidebar .profile-link { justify-content: center; padding: 10px 0; }
    .profile-details, .profile-settings { display: none; }
}
@media (max-width: 600px) {
    .sidebar { border-right: 0; border-top: 1px solid #d6e7e8; height: calc(66px + env(safe-area-inset-bottom, 0px)); padding: 7px max(10px, env(safe-area-inset-right, 0px)) calc(7px + env(safe-area-inset-bottom, 0px)) max(10px, env(safe-area-inset-left, 0px)); align-items: center; }
    .main { margin-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
    .sidebar nav { flex: 1; width: auto; min-width: 0; gap: 4px; }
    .sidebar nav a { flex: 1; min-width: 44px; padding: 8px 0; }
    .sidebar .profile-link { display: flex; align-items: center; justify-content: center; margin: 0 0 0 6px; padding: 5px; flex-shrink: 0; }
    .profile-details, .profile-settings { display: none; }
    .sidebar nav a[aria-current="page"]::before { left: 10px; right: 10px; top: -4px; bottom: auto; width: auto; height: 3px; }
}
