@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #eaeef6;
    font-family: 'Open Sans', sans-serif;
}

.header-topo {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 100;
}

.logo-header {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--cor-primaria);
}

.menu-mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-mobile-toggle svg {
    width: 28px;
    height: 28px;
    color: #6a778e;
}

.navbar {
    position: fixed;
    top: 96px;
    left: 1rem;
    background: #fff;
    border-radius: 10px;
    padding: 1rem 0;
    box-shadow: 0 0 40px rgba(0,0,0,0.03);
    height: calc(100vh - 112px);
    width: 88px;
    overflow: hidden;
}

.navbar-topo {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid #eaeef6;
    margin-bottom: 1rem;
}

.usuario-nome {
    font-size: 0.7rem;
    color: #6a778e;
    margin-bottom: 0.5rem;
    word-wrap: break-word;
}

.usuario-badge {
    display: inline-block;
    background: var(--cor-primaria);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-size: 0.6rem;
    font-weight: 600;
}

.navbar__link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 56px;
    width: 88px;
    color: #6a778e;
    transition: 250ms ease all;
    text-decoration: none;
}

.navbar__link span {
    position: absolute;
    left: 100%;
    transform: translate(-48px);
    margin-left: 1rem;
    opacity: 0;
    pointer-events: none;
    color: var(--cor-primaria);
    background: #fff;
    padding: 0.75rem;
    transition: 250ms ease all;
    border-radius: 17.5px;
    white-space: nowrap;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.navbar:not(:hover) .navbar__link:focus span,
.navbar__link:hover span {
    opacity: 1;
    transform: translate(0);
}

.navbar__menu {
    position: relative;
    list-style: none;
}

.navbar__menu:before {
    content: '';
    position: absolute;
    opacity: 0;
    z-index: 0;
    top: 0;
    left: 1rem;
    width: 56px;
    height: 56px;
    background: var(--cor-primaria);
    border-radius: 17.5px;
    transition: 250ms cubic-bezier(1, 0.2, 0.1, 1.2) all;
}

.navbar__item {
    position: relative;
    z-index: 1;
}

.navbar__item:nth-child(1):hover {
    color: #fff;
}

.navbar__item:nth-child(1):hover .navbar__link {
    color: #fff;
}

.navbar__menu:has(.navbar__item:nth-child(1):hover):before {
    top: 0;
    opacity: 1;
}

.navbar__item:nth-child(2):hover .navbar__link {
    color: #fff;
}

.navbar__menu:has(.navbar__item:nth-child(2):hover):before {
    top: 56px;
    opacity: 1;
}

.navbar__item:nth-child(3):hover .navbar__link {
    color: #fff;
}

.navbar__menu:has(.navbar__item:nth-child(3):hover):before {
    top: calc(56px * 2);
    opacity: 1;
}

.navbar__item:nth-child(4):hover .navbar__link {
    color: #fff;
}

.navbar__menu:has(.navbar__item:nth-child(4):hover):before {
    top: calc(56px * 3);
    opacity: 1;
}

.navbar__item:nth-child(5):hover .navbar__link {
    color: #fff;
}

.navbar__menu:has(.navbar__item:nth-child(5):hover):before {
    top: calc(56px * 4);
    opacity: 1;
}

.navbar__item:nth-child(6):hover .navbar__link {
    color: #fff;
}

.navbar__menu:has(.navbar__item:nth-child(6):hover):before {
    top: calc(56px * 5);
    opacity: 1;
}

.conteudo-principal {
    margin-left: 120px;
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

main {
    width: 100%;
}

input[type="radio"]:checked {
    background-color: currentColor;
}

@media (max-width: 768px) {
    .header-topo {
        padding: 0 1rem;
        height: 64px;
    }

    .logo-header {
        font-size: 1.2rem;
    }

    .logo-header img {
        height: 40px !important;
    }

    .menu-mobile-toggle {
        display: block;
    }

    .navbar {
        position: fixed;
        top: 64px;
        left: 0;
        width: 280px;
        height: calc(100vh - 64px);
        max-height: calc(100vh - 64px);
        overflow-y: auto;
        border-radius: 0;
        z-index: 99;
        transition: transform 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }

    .navbar.mobile-hidden {
        transform: translateX(-100%);
    }

    .navbar__link {
        width: 100%;
        justify-content: flex-start;
        padding-left: 1rem;
        gap: 0.75rem;
    }

    .navbar__link span {
        position: static;
        left: auto;
        transform: none;
        opacity: 1;
        margin-left: 0;
        background: transparent;
        padding: 0;
        box-shadow: none;
        pointer-events: auto;
    }

    .navbar__menu:before {
        left: 0;
        width: 100%;
    }

    .conteudo-principal {
        margin-left: 0;
        margin-top: 64px;
        padding: 1rem;
    }

    .navbar-topo {
        padding: 1rem;
    }

    .usuario-nome {
        font-size: 0.85rem;
    }

    main {
        padding: 0 !important;
    }

    .p-8 {
        padding: 1rem !important;
    }

    .overflow-x-auto {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
    }

    .grid {
        grid-template-columns: 1fr !important;
    }

    .md\:grid-cols-2,
    .md\:grid-cols-3,
    .md\:grid-cols-4,
    .md\:grid-cols-5,
    .lg\:grid-cols-5 {
        grid-template-columns: 1fr !important;
    }

    .flex {
        flex-wrap: wrap;
    }

    .justify-between {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }

    .mb-8 .flex.justify-between {
        width: 100%;
    }

    .mb-8 .flex.justify-between > * {
        width: 100%;
    }

    button,
    a.inline-block {
        width: 100%;
    }

    .text-3xl {
        font-size: 1.5rem !important;
    }

    .text-2xl {
        font-size: 1.25rem !important;
    }

    .max-w-md,
    .max-w-3xl {
        max-width: 100% !important;
    }

    .px-6 {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }

    .py-4 {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
}
