@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* Layout base */
:root {
    --header-height: 4.5rem;
    --footer-height: 3.25rem;
}

html,
body {
    height: 100%;
    margin: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f6fa;
    color: #2d3436;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
}

.wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content .container-fluid {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.content .container-fluid > .row {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-wrap: wrap;
}

header.app-header {
    position: sticky;
    top: 0;
    z-index: 1050;
    flex: 0 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

header.app-header .navbar {
    min-height: var(--header-height);
    display: flex;
    align-items: center;
}

footer.app-footer {
    position: sticky;
    bottom: 0;
    z-index: 1040;
    flex: 0 0 auto;
    min-height: var(--footer-height);
}

footer.app-footer .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

main[role="main"] {
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 1.5rem;
}

/* Estilos para a sidebar */
.sidebar {
    background-color: #f8f9fa;
    /* Altere conforme necessário */
}

.sidebar-fixed {
    --sidebar-top-offset: var(--header-height);
}

.nav-link {
    color: #333;
    /* Cor do texto */
    transition: all 0.3s ease-in-out;
    /* Suavização de hover */
    font-family: 'Poppins', sans-serif;
}

.nav-link:hover,
.nav-link:focus {
    color: #0056b3;
    /* Cor ao passar o mouse e focar */
    text-decoration: none;
    background-color: #e9ecef;
    /* Fundo ao passar o mouse */
}

.nav-link.active {
    color: #fff;
    /* Cor do texto ativo */
    background-color: #96bbe8;
    /* Fundo ativo */
}

.sidebar .report-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    justify-content: center;
    background: linear-gradient(135deg, #1f6feb 0%, #173a8c 100%);
    color: #fff;
    font-weight: 600;
    border-radius: 999px;
    padding: 0.65rem 1rem;
    margin-top: 0.75rem;
    box-shadow: 0 6px 16px rgba(23, 58, 140, 0.25);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar .report-link:hover,
.sidebar .report-link:focus {
    color: #fff;
    background: linear-gradient(135deg, #2158c4 0%, #132c6b 100%);
    box-shadow: 0 8px 20px rgba(19, 44, 107, 0.35);
    transform: translateY(-1px);
}

.sidebar-footer {
    padding: 1.5rem 1rem 1rem;
    margin-top: auto;
    text-align: center;
}

.sidebar-version,
.sidebar-developed {
    font-family: 'Poppins', sans-serif;
    color: #636e72;
}

.sidebar-footer img {
    max-width: 160px;
    width: 100%;
    height: auto;
    display: inline-block;
}

@media (max-width: 767.98px) {
    .sidebar-footer {
        padding: 1rem 0.5rem 1.5rem;
        margin-top: 1.5rem;
    }

    .sidebar-footer img {
        max-width: 140px;
    }
}


.navbar {
    background: linear-gradient(to right, #a3ccf8 0%, #130f40 100%);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Poppins', sans-serif;
    color: white;
    font-weight: bold;
    /* Define o texto como negrito */
    text-transform: uppercase;
    /* Transforma o texto em maiúsculas */
    padding: 0.5rem 0;
}

.navbar-brand img {
    display: block;
    height: auto;
}

.navbar-brand-symbol {
    max-height: 54px;
    width: auto;
}

.navbar-brand-title {
    max-height: 42px;
    width: auto;
}

@media (max-width: 768px) {
    .navbar-brand {
        gap: 0.5rem;
    }

    .navbar-brand-symbol {
        max-height: 48px;
    }

    .navbar-brand-title {
        max-height: 36px;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }

    .navbar-brand-symbol {
        max-height: 40px;
    }

    .navbar-brand-title {
        max-height: 30px;
    }
}

.navbar-brand:hover {
    color: white;
}

@media (min-width: 768px) {
    .content .container-fluid > .row {
        flex-wrap: nowrap;
    }

    #sidebarMenu {
        position: sticky;
        top: var(--sidebar-top-offset, 0px);
        align-self: flex-start;
        max-height: calc(100vh - var(--sidebar-top-offset, 0px) - var(--footer-height));
        overflow-y: auto;
    }
}

#sidebarMenu {
    display: flex;
    flex-direction: column;
}

#sidebarMenu .sidebar-sticky {
    flex: 1;
    min-height: calc(100vh - var(--sidebar-top-offset, 0px) - var(--footer-height));
    padding-top: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

#sidebarMenu .nav {
    margin-top: 0;
}

#sidebarMenu .nav.flex-column {
    flex: 0 0 auto;
}

#sidebarMenu .sidebar-footer {
    padding-bottom: 0;
}

.data-card,
.form-card {
    border: none;
    border-radius: 1rem;
    background-color: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    font-family: 'Poppins', sans-serif;
}

.form-card {
    margin-top: 1.5rem;
}

.data-card + .data-card {
    margin-top: 1.5rem;
}

.data-card .card-header {
    align-items: center;
    background: linear-gradient(135deg, rgba(163, 204, 248, 0.45) 0%, rgba(19, 15, 64, 0.85) 100%);
    border-bottom: none;
    border-radius: 1rem 1rem 0 0;
    color: #1d3557;
    display: flex;
    font-size: 1.05rem;
    font-weight: 600;
    gap: 0.5rem;
    letter-spacing: 0.02em;
    padding: 1rem 1.5rem;
    text-transform: uppercase;
}

.data-card .card-body,
.form-card .card-body {
    padding: 2rem;
}

.data-card .table-responsive {
    border-radius: 0 0 1rem 1rem;
    overflow: hidden;
}

.data-card .table {
    margin-bottom: 0;
}

.data-card .table thead th {
    background-color: #f1f4fb;
    border-bottom: none;
    color: #1d3557;
    font-weight: 600;
    text-transform: uppercase;
}

.data-card .table tbody td {
    vertical-align: middle;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1d3557;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1rem;
    color: #576574;
    background-color: rgba(29, 53, 87, 0.08);
    padding: 0.85rem 1.15rem;
    border-radius: 0.85rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .form-card {
        margin-top: 1rem;
    }

    .data-card .card-body,
    .form-card .card-body {
        padding: 1.5rem;
    }

    .data-card .card-header {
        padding: 0.85rem 1.25rem;
        font-size: 0.95rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .page-subtitle {
        font-size: 0.95rem;
    }
}

.app-footer {
    background-color: #f8f9fa;
    padding: 10px 0;
    width: 100%;
    text-align: center;
}

.gap-2 {
    gap: 0.5rem !important;
}

.reserva-texto {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    white-space: pre-line;
}

.tema-count {
    background-color: #007bff;
    color: #fff;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    font-size: 1rem;
}

.tema-action {
    margin-top: 1rem;
}

.tema-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #8e44ad;
    font-size: 1.5rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.tema-action-link:hover,
.tema-action-link:focus {
    color: #5e337b;
    text-decoration: none;
    transform: translateY(-2px);
}

.alphabet-filter {
    border: none;
    border-radius: 16px;
}

.alphabet-filter .card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.alphabet-filter__label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #636e72;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.alphabet-filter__letters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.alphabet-filter__button {
    align-items: center;
    background-color: #f2f4f8;
    border: 2px solid transparent;
    border-radius: 50%;
    color: #2d3436;
    display: inline-flex;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    height: 42px;
    justify-content: center;
    min-width: 42px;
    padding: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

.alphabet-filter__button--all {
    border-radius: 999px;
    min-width: auto;
    padding: 0.5rem 1.1rem;
}

.alphabet-filter__button:hover,
.alphabet-filter__button:focus {
    background-color: #e4ecfb;
    color: #1f6feb;
    text-decoration: none;
}

.alphabet-filter__button.active {
    background-color: #ffffff;
    border-color: #1f6feb;
    color: #1f6feb;
    box-shadow: 0 0 0 4px rgba(31, 111, 235, 0.15);
}

.alphabet-filter__button.disabled {
    background-color: #f7f7f7;
    color: #b2bec3;
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
}

.alphabet-filter__button.disabled:hover,
.alphabet-filter__button.disabled:focus {
    background-color: #f7f7f7;
    color: #b2bec3;
}

@media (max-width: 576px) {
    .alphabet-filter__button {
        height: 36px;
        min-width: 36px;
        font-size: 0.85rem;
    }
}