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

/* ================================
   Design tokens
   ================================ */
:root {
    /* Azul escuro — mesma identidade do SBDataAnalyserADM (--color-primary de lá) */
    --da-primary: #224193;
    --da-primary-dark: #1c367b;
    --da-primary-soft: #edf1fa;
    --da-surface: #f4f6fb;
    --da-card-bg: #ffffff;
    --da-border: #e3e8f0;
    --da-border-strong: #cbd0dd;
    --da-text: #141824;
    --da-text-2: #525b75;
    --da-text-3: #6e7891;
    --da-radius: .75rem;
    --da-radius-lg: 1.25rem;
    --da-shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .06);
    --da-shadow: 0 .5rem 1.5rem rgba(15, 23, 42, .08);
    --navbar-top-bg-color: #fff;
    --navbar-vertical-border-color: var(--da-border);
    --navbar-top-height: 4rem;
}

*,
::after,
::before {
    box-sizing: border-box;
}

/* ================================
   Estilos globais
   ================================ */
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    overflow-y: auto;
    background: var(--da-surface);
    color: var(--da-text);
}

a {
    text-decoration: none !important;
    cursor: pointer;
}

li {
    list-style: none;
}

/* Scrollbar discreta (WebKit) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #c6cdda;
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

    ::-webkit-scrollbar-thumb:hover {
        background-color: #a8b1c2;
    }

/* ================================
   Tipografia
   ================================ */
h6, .h6, h5, .h5, h4, .h4, h3, .h3, h2, .h2, h1, .h1 {
    margin-top: 0;
    margin-bottom: .25rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--da-text);
}

h2 {
    font-weight: 700;
    font-size: 1.55rem;
}

h3, .h3 {
    font-weight: 700;
    font-size: 1.3rem;
}

h4 {
    font-size: 1.15rem;
    color: var(--bs-emphasis-color);
}

h5 {
    font-size: 1.05rem;
    font-weight: 600 !important;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

.text-body-emphasis {
    color: var(--da-text) !important;
}

.text-body-tertiary {
    opacity: 1;
    color: var(--da-text-2) !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

/* Cabeçalho padrão de página (título + subtítulo + ações) */
.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1rem;
    margin-bottom: 1.25rem;
}

    .page-header .page-title {
        font-size: 1.55rem;
        font-weight: 700;
        margin-bottom: .15rem;
        letter-spacing: -.02em;
    }

    .page-header .page-subtitle {
        color: var(--da-text-2);
        font-size: .9rem;
        margin-bottom: 0;
        font-weight: 500;
    }

/* ================================
   NavBar superior
   ================================ */
.navbar img {
    height: 40px;
    width: 40px;
}

    .navbar img.logo-navbar {
        height: 54px;
        width: auto;
    }

@media (max-width: 575.98px) {
    .navbar img.logo-navbar {
        height: 40px;
    }
}

.navbar-top {
    background: var(--navbar-top-bg-color);
    border-bottom: 1px solid var(--navbar-vertical-border-color);
    font-size: .8rem;
    font-weight: 600;
    min-height: var(--navbar-top-height);
    padding: 0 1.25rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}

.navbar .navbar-logo,
.logo-text {
    display: flex;
    align-items: center;
    color: rgba(82, 91, 117, 0.9);
    font-weight: 600;
    letter-spacing: -0.04em;
}

.logo-text {
    font-size: .95rem;
}

.nav-item,
.navbar-nav-custom {
    display: flex;
    align-items: center;
    --bs-nav-link-padding-x: 0;
    --bs-nav-link-padding-y: 0.5rem;
    --bs-nav-link-color: var(--bs-navbar-color);
    --bs-nav-link-hover-color: var(--bs-navbar-hover-color);
    --bs-nav-link-disabled-color: var(--bs-navbar-disabled-color);
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
}

.navbar-nav-icons {
    gap: .25rem;
}

.nav-link {
    padding: 0.65rem 0.55rem;
    border-radius: .625rem;
    color: var(--da-text-2);
    transition: background-color .15s ease, color .15s ease;
}

    .navbar-top .nav-link:hover,
    .navbar-top .nav-link:focus-visible {
        background-color: #eff2f6;
        color: var(--da-text);
    }

/* Seta/caret do dropdown do avatar */
.navbar .dropdown-menu.dropdown-caret::after {
    background-color: white !important;
    content: "";
    position: absolute;
    z-index: -1;
    width: 1rem;
    height: 1rem;
    background: inherit;
    top: -0.375rem;
    right: 0.9rem;
    left: auto;
    transform: rotate(45deg);
    border-radius: 0.125rem;
    border: 1px solid var(--da-border-strong);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* ================================
   Dropdowns
   ================================ */
.dropdown-toggle::after {
    display: none;
}

.dropdown-menu {
    box-shadow: 0 .5rem 1.25rem rgba(15, 23, 42, .12);
    font-size: .9rem;
    border-radius: .75rem;
    border: 1px solid var(--da-border);
    overflow: hidden;
}

.dropdown-item {
    color: #333;
    padding: .5rem .9rem;
    font-weight: 500;
    transition: background-color .12s ease;
}

    .dropdown-item i {
        width: 1.15rem;
        text-align: center;
        color: var(--da-text-2);
    }

    .no-hover-effect:hover,
    .dropdown-item:hover,
    .dropdown-item:focus {
        background-color: #eff2f6;
    }

.dropdown-item,
.dropdown-item:hover,
.dropdown-item:focus {
    color: #000 !important;
}

.dropdown-header-user {
    padding: .65rem .9rem .5rem;
    border-bottom: 1px solid var(--da-border);
    background: #f8fafd;
}

    .dropdown-header-user .user-name {
        font-weight: 600;
        font-size: .85rem;
        color: var(--da-text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 13rem;
    }

    .dropdown-header-user .user-role {
        font-size: .7rem;
        font-weight: 600;
        letter-spacing: .03em;
        color: var(--da-text-3);
        text-transform: uppercase;
    }

/* Menu de administração (grade de atalhos) */
.rowMenu {
    display: flex;
    justify-content: center;
    padding: 0 4px;
}

.col-6-edit {
    flex: 0 0 auto;
    width: 50%;
    display: flex;
    justify-content: center;
    padding: 6px;
}

.btn-container {
    width: 110px;
    height: 72px;
    color: #212529 !important;
    border: 1px solid var(--da-border);
    padding: 12px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    background-color: #f8f9fc;
    border-radius: .625rem;
    transition: all 0.2s ease;
}

    .btn-container:hover {
        border-color: rgba(34, 65, 147, .35);
        background-color: var(--da-primary-soft);
        transform: translateY(-1px);
    }

    .btn-container i {
        font-size: 22px;
    }

.descricao-btn {
    text-align: center;
    font-size: 12px !important;
    font-weight: 500;
    line-height: 1;
}

.efeitoHover {
    color: #333 !important;
}

    .efeitoHover:hover, .dropdown-item:focus {
        color: var(--da-primary-dark) !important;
    }

        .efeitoHover:hover *, .efeitoHover:focus * {
            color: inherit !important;
        }

/* ================================
   Estrutura da página
   ================================ */
.wrapper {
    align-items: stretch;
    display: flex;
    width: 100%;
}

.main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    overflow: hidden;
    transition: all 0.35s ease-in-out;
    width: 100%;
    background: var(--da-surface);
}

.content {
    flex: 1;
    max-width: 100%;
    width: 100%;
    padding: 5.25rem 1.5rem 3rem 1.5rem;
}

@media (max-width: 575.98px) {
    .content {
        padding: 5rem .875rem 2.5rem .875rem;
    }
}

/* ================================
   Cards
   ================================ */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    color: #31374a;
    word-wrap: break-word;
    background-color: var(--da-card-bg);
    background-clip: border-box;
    border: 1px solid var(--da-border);
    border-radius: var(--da-radius);
    box-shadow: var(--da-shadow-sm);
}

.card-body {
    flex: 1 1 auto;
    padding: 1.25rem 1.25rem;
}

.h-100 {
    height: 100% !important;
}

.illustration {
    background-color: var(--bs-primary-bg-subtle);
    color: var(--bs-emphasis-color);
}

.illustration-img {
    max-width: 150px;
    width: 100%;
}

/* ================================
   Formulários
   ================================ */
.form-label, label {
    font-weight: 500;
    font-size: .85rem;
    color: var(--da-text);
    margin-bottom: .35rem;
}

.form-control, .form-select {
    border-color: var(--da-border-strong);
    border-radius: .5rem;
}

    .form-control:focus, .form-select:focus {
        border-color: var(--da-primary);
        box-shadow: 0 0 0 .2rem rgba(34, 65, 147, .15);
    }

.label-bold {
    font-weight: 600;
}

.gl-max-w-80 {
    max-width: 40rem;
}

.gl-max-w-70 {
    max-width: 30rem;
}

.file {
    font-size: 0.9rem;
}

/* ================================
   Botões
   ================================ */
.btn {
    border-radius: .5rem;
}

.btn-primary {
    --bs-btn-bg: var(--da-primary);
    --bs-btn-border-color: var(--da-primary);
    --bs-btn-hover-bg: var(--da-primary-dark);
    --bs-btn-hover-border-color: var(--da-primary-dark);
    --bs-btn-active-bg: var(--da-primary-dark);
    --bs-btn-active-border-color: var(--da-primary-dark);
}

.btn-link {
    color: var(--da-primary);
}

.btn-editar {
    font-size: 11px;
    font-weight: 600;
    background-color: var(--da-primary) !important;
    color: #fff !important;
}

    .btn-editar:hover {
        background-color: var(--da-primary-dark) !important;
    }

/* ================================
   Tabelas
   ================================ */
td {
    vertical-align: middle;
}

thead th span {
    color: #31374a;
    font-weight: 700;
    font-size: .8rem !important;
}

thead th {
    color: #31374a;
    font-weight: 700;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .02em;
}

tbody tr td {
    font-size: .8rem !important;
    color: var(--da-text) !important;
}

.content tbody tr:hover {
    background-color: #f5f7fb !important;
}

.border-y {
    border-top: 1px solid var(--da-border-strong) !important;
    border-bottom: 1px solid var(--da-border-strong) !important;
}

/* Badges de status/tipo nas tabelas */
.badge-soft {
    display: inline-block;
    padding: .3rem .6rem;
    border-radius: 2rem;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .02em;
    line-height: 1;
}

.badge-soft-primary {
    background: var(--da-primary-soft);
    color: var(--da-primary-dark);
}

.badge-soft-secondary {
    background: #eef1f6;
    color: var(--da-text-2);
}

.badge-soft-success {
    background: #e7f7ef;
    color: #157347;
}

.badge-soft-danger {
    background: #fdecec;
    color: #b02a37;
}

/* ================================
   DataTables (dentro de cards)
   ================================ */
.dt-container {
    font-size: .85rem;
}

.dt-column-order {
    position: relative !important;
    margin-left: 20px;
}

.pagination a {
    font-size: 0.85rem;
}

.dt-info {
    font-size: 0.85rem;
    color: var(--da-text-2) !important;
}

.dt-search input.form-control,
.dt-length select.form-select {
    border-radius: .5rem;
}

.dt-paging .pagination .page-link {
    border-radius: .45rem;
    margin: 0 .12rem;
    border: 1px solid transparent;
    color: var(--da-text-2);
}

.dt-paging .pagination .page-item.active .page-link {
    background: var(--da-primary);
    border-color: var(--da-primary);
    color: #fff;
}

/* ================================
   Breadcrumb
   ================================ */
.breadcrumb {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: .5rem;
}

    .breadcrumb a {
        color: var(--da-text-2);
        transition: color .12s ease;
    }

        .breadcrumb a:hover {
            color: var(--da-primary);
        }

    .breadcrumb .breadcrumb-item.active {
        color: var(--da-text);
    }

.breadcrumb-item + .breadcrumb-item::before {
    float: left;
    padding-right: 0.5rem;
    color: #3e465b;
    content: var(--phoenix-breadcrumb-divider, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='10' width='6' fill='%236e7891' viewBox='0 0 256 480'%3E%3Cpath d='M224.3 273l-136 136c-9.4 9.4-24.6 9.4-33.9 0l-22.6-22.6c-9.4-9.4-9.4-24.6 0-33.9l96.4-96.4-96.4-96.4c-9.4-9.4-9.4-24.6 0-33.9L54.3 103c9.4-9.4 24.6-9.4 33.9 0l136 136c9.5 9.4 9.5 24.6.1 34z'/%3E%3C/svg%3E"));
}

/* ================================
   Modais
   ================================ */
.modal-content {
    border: none;
    border-radius: var(--da-radius);
    box-shadow: var(--da-shadow);
}

.modal-header {
    border-bottom: 1px solid var(--da-border);
    padding: 1rem 1.25rem;
}

.modal-title {
    font-weight: 600;
}

.modal-footer {
    border-top: 1px solid var(--da-border);
    padding: .75rem 1.25rem;
}

.modal-body {
    overflow-y: auto;
    overflow-x: auto;
}

/* ================================
   Offcanvas
   ================================ */
.offcanvas {
    border-radius: 0 0 var(--da-radius) var(--da-radius);
}

/* ================================
   Estado vazio (sem registros)
   ================================ */
.empty-state {
    text-align: center;
    padding: 4rem 1.5rem;
}

    .empty-state .empty-state-icon {
        width: 92px;
        height: 92px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #eff2f6;
        color: #6e7891;
        font-size: 2.4rem;
        margin: 0 auto 1.25rem;
    }

    .empty-state h5 {
        font-weight: 600;
        margin-bottom: .35rem;
    }

    .empty-state p {
        color: var(--da-text-2);
        font-size: .9rem;
        margin-bottom: 0;
    }

/* ================================
   Loading overlay
   ================================ */
#loadingSpinner {
    backdrop-filter: blur(2px);
}

/* ================================
   Diversos / legado
   ================================ */
.no-hover-effect {
    border: none;
}

.no-hover:hover, .no-hover:focus {
    background-color: transparent;
    color: inherit;
}

.select2-dropdown {
    z-index: 1100;
}

.avatar {
    height: 35px;
    border: 1px solid var(--da-border-strong);
}

.avatar-image {
    max-width: 100px;
    max-height: 100px;
    object-fit: cover;
}

.mx-lg-n6 {
    margin-right: -2.5rem !important;
    margin-left: -2.5rem !important;
}

hr {
    border: 0;
    height: 1px;
    background-color: var(--da-border-strong);
    width: 100%;
    opacity: 1;
}

.container-fluid {
    font-size: 14px;
    padding-left: 0;
    padding-right: 0;
}

.custom-container {
    max-width: 1280px;
    margin-right: auto;
    margin-left: auto;
}

/* ================================
   Media queries
   ================================ */
@media screen and (max-width: 480px) {
    .recaptcha {
        transform: scale(0.77);
        -webkit-transform: scale(0.77);
        transform-origin: 0 0;
        -webkit-transform-origin: 0 0;
    }
}
