﻿html, body {
    height: 100%;
    min-height: 100vh;
}

body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

a{
    text-decoration: none;
}

.announcement {
    display: flex;
    -webkit-justify-content: center;
    justify-content: center;
    margin-bottom: 20px;
}
.announcement .card {
    width: 350px;
    margin-left: 10px;
    margin-right: 10px;
    margin-top: -40px;
}

@media only screen and (max-width: 992px) {
    .announcement {
        flex-flow:column;
        -webkit-justify-content: center;
        justify-content: center;
        margin-bottom: 20px;
    }

        .announcement .card {
            width: 97%;
            margin-top: 10px;
        }
}

:root {
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 88px;
}

.dashboard-main {
    flex: 1;
    background: #f5f7fb;
}

.dashboard-shell {
    display: flex;
    min-height: calc(100vh - 120px);
}

.dashboard-sidebar {
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    transition: width 0.3s ease, transform 0.3s ease;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.05);
}

.sidebar-brand, .sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-avatar, .user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.brand-copy, .user-name {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.5rem;
}

.user-title {
    font-size: 1.2rem;
    text-decoration: none;
}

.brand-user-link {
    font-size: 0.85rem;
    color: #d1e4ff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.brand-user-link:hover,
.brand-user-link:focus {
    color: #ffffff;
    text-decoration: underline;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #c4d4e4;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: color 0.2s ease, background 0.2s ease;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link:focus,
.sidebar-nav .nav-link.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: font-size 0.2s ease;
}

.sidebar-label {
    white-space: nowrap;
}

.sidebar-collapsible {
    width: 100%;
    justify-content: space-between;
    background: transparent;
    border: 0;
}

.submenu {
    padding-left: 3.5rem;
    margin-bottom: 0.5rem;
}

.submenu-link {
    display: block;
    color: #9fb2c7;
    padding: 0.35rem 0;
    font-size: 0.92rem;
}

.submenu-link:hover,
.submenu-link:focus {
    color: #ffffff;
}

.collapse-caret {
    transition: transform 0.2s ease;
}

.sidebar-collapsible[aria-expanded="true"] .collapse-caret {
    transform: rotate(180deg);
}

.dashboard-content {
    flex: 1;
    background: #f9fbfd;
    min-height: calc(100vh - 140px);
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(14, 25, 38, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1035;
}

.sidebar-toggle {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

body.sidebar-desktop-collapsed .dashboard-sidebar {
    width: var(--sidebar-collapsed-width);
}

body.sidebar-desktop-collapsed .sidebar-label,
body.sidebar-desktop-collapsed .user-name,
body.sidebar-desktop-collapsed .sidebar-collapsible .collapse-caret {
    opacity: 0;
    visibility: hidden;
}

body.sidebar-desktop-collapsed .user-avatar {
    margin: 0 auto;
}

body.sidebar-desktop-collapsed .sidebar-icon {
    font-size: 1.4rem;
}

@media (max-width: 991.98px) {
    .dashboard-shell {
        position: relative;
        min-height: calc(100vh - 120px);
    }

    .dashboard-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        height: 100vh;
        transform: translateX(-100%);
        z-index: 1040;
    }

    body.sidebar-mobile-open .dashboard-sidebar {
        transform: translateX(0);
    }

    body.sidebar-mobile-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .dashboard-content {
        min-height: auto;
    }
}