﻿.navbar-toggler {
    appearance: none;
    cursor: pointer;
    width: 3.5rem;
    height: 2.5rem;
    color: #374151;
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2855, 65, 81, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(0, 0, 0, 0.05);
}

.navbar-toggler:checked {
    background-color: rgba(0, 0, 0, 0.1);
}

.top-row {
    height: 3.5rem;
    background-color: #ffffff;
}

.nav-scrollable {
    background-color: #ffffff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

.nav-scrollable nav {
    flex-grow: 1;
}

.navbar-brand {
    font-size: 1.1rem;
    color: #374151;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    max-width: 200px;
    opacity: 1;
    transition: max-width 0.3s ease, opacity 0.2s ease;
}

.navbar-brand.brand-hidden {
    max-width: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

.nav-footer {
    padding: 0.75rem;
    background-color: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.bi {
    display: inline-block;
    position: relative;
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.75rem;
    top: -1px;
    font-size: 1.25rem;
    line-height: 1.25rem;
}

.nav-item {
    font-size: 0.9rem;
    padding-bottom: 0.5rem;
}

.nav-item:first-of-type {
    padding-top: 1rem;
}

.nav-item:last-of-type {
    padding-bottom: 1rem;
}

.nav-item ::deep .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    background: none;
    border: none;
    border-radius: 4px;
    height: 3rem;
    display: flex;
    align-items: center;
    line-height: 3rem;
    width: 100%;
    text-decoration: none;
    padding: 0 1rem;
}

.nav-item ::deep a.active {
    background-color: #dbeafe;
    color: #2563eb;
    border-right: 3px solid #2563eb;
}

.nav-item ::deep .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
}

.nav-scrollable {
    display: none;
}

.navbar-toggler:checked ~ .nav-scrollable {
    display: block;
}

@media (min-width: 641px) {
    .navbar-toggler {
        display: none;
    }

    .nav-scrollable {
        display: block;
        width: 250px;
        height: calc(100vh - 3.5rem);
        overflow-y: auto;
        transition: width 0.3s ease;
    }

    .nav-scrollable.icons-only {
        width: 4.5rem;
    }
}

.nav-scrollable {
    transition: width 0.3s ease;
}

.nav-scrollable.icons-only {
    width: 4.5rem;
}

.nav-scrollable.icons-only .nav-text {
    display: none;
}

.nav-scrollable.icons-only .nav-item {
    display: flex;
    justify-content: center;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.nav-scrollable.icons-only .nav-link {
    justify-content: center;
    padding: 0;
}

.nav-scrollable.icons-only .bi,
.nav-scrollable.icons-only .nav-icon {
    margin-right: 0 !important;
}

.user-profile-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
    cursor: pointer;
    border-radius: 6px;
    padding: 0.5rem;
    transition: background-color 0.2s;
}

.user-profile-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.avatar-circle {
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #ffffff;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.user-info {
    margin-left: 0.75rem;
    overflow: hidden;
    white-space: nowrap;
}

.user-name {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: #ffffff;
}

.user-role {
    display: block;
    font-size: 0.75rem;
    color: #cbd5e1;
}

.nav-scrollable.icons-only .user-info {
    display: none;
}

.nav-scrollable.icons-only .nav-footer {
    display: flex;
    justify-content: center;
    padding: 1rem 0;
}

.nav-scrollable.icons-only .user-profile-link {
    padding: 0;
    justify-content: center;
}
