:root {
    --nav-height: 72px;
}

body {
    font-family: Arial, sans-serif;
    padding-top: var(--nav-height);
}
.card {
    transition: transform 0.2s;
}
.card:hover {
    transform: scale(1.02);
}
.btn-action {
    margin: 5px;
}

/* Sidebar layout */
#sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background-color: #343a40;
    overflow-y: auto;
    transition: left 0.3s ease;
    padding-top: var(--nav-height);
    z-index: 1040;
}

#sidebar.show {
    left: 0;
}

#sidebar .nav-link {
    color: #fff;
}

#sidebar .nav-link:hover {
    background-color: #495057;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#sidebarCollapseBtn {
    border-radius: 999px;
    line-height: 1;
    padding: 0.1rem 0.55rem 0.25rem;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(1px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    z-index: 1035;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

body.sidebar-open {
    overflow: hidden;
}

/* Top navigation styling */
.top-nav {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 64, 175, 0.9));
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
    transition: background 0.3s ease;
    z-index: 1100;
}

.top-nav .navbar-brand,
.top-nav .nav-link,
.top-nav .navbar-text {
    color: #f8fafc;
}

.brand-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    color: #fff;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.3s ease;
}

.brand-pill:hover {
    background: rgba(148, 163, 184, 0.3);
    transform: translateY(-1px);
    color: #fff;
}

.brand-pill .brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-pill .brand-text small {
    font-size: 0.7rem;
    letter-spacing: 0.05em;
    color: rgba(226, 232, 240, 0.7);
}

.btn-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.3);
    background: rgba(148, 163, 184, 0.15);
    color: #f8fafc;
}

.btn-nav:hover {
    background: rgba(148, 163, 184, 0.3);
}

.nav-glass {
    border: 1px solid rgba(226, 232, 240, 0.25);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.2);
}

.language-switcher .glass-field {
    min-width: 130px;
    background: rgba(248, 250, 252, 0.12);
    border: 1px solid rgba(226, 232, 240, 0.25);
    color: #f8fafc;
}

.language-switcher .glass-field:focus {
    box-shadow: none;
    border-color: rgba(148, 163, 184, 0.6);
}

.nav-profile {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.15rem 0.35rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.15);
    transition: background 0.3s ease;
}

.nav-profile:hover,
.nav-profile:focus {
    background: rgba(30, 41, 59, 0.3);
}

.avatar-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #38bdf8, #818cf8);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.profile-meta {
    display: flex;
    flex-direction: column;
    max-width: 160px;
    color: #f8fafc;
    font-size: 0.85rem;
    line-height: 1.1;
}

.profile-meta .profile-name {
    font-weight: 600;
}

.profile-meta .profile-role {
    font-size: 0.7rem;
}

.nav-auth {
    border-radius: 999px;
    padding-inline: 1.25rem;
    font-weight: 600;
}

.dropdown-menu {
    border-radius: 16px;
    overflow: hidden;
}

@media (max-width: 576px) {
    :root {
        --nav-height: 80px;
    }

    .brand-pill {
        padding-right: 0.6rem;
    }

    .profile-meta {
        max-width: 120px;
    }
}

@media (min-width: 992px) {
    .sidebar-visible #sidebar {
        left: 0;
    }

    .sidebar-visible .sidebar-overlay {
        display: none;
    }

    .sidebar-visible .main-content {
        margin-left: 250px;
    }
}
