﻿@font-face {
    font-family: 'Gilroy-Bold';
    font-style: normal;
    font-weight: normal;
    src: local('Gilroy-Bold'), url('../fonts/Gilroy-Bold.woff') format('woff');
}

@font-face {
    font-family: 'Gilroy-Heavy';
    font-style: normal;
    font-weight: normal;
    src: local('Gilroy-Heavy ☞'), url('../fonts/Gilroy-Heavy.woff') format('woff');
}

@font-face {
    font-family: 'Gilroy-Light';
    font-style: normal;
    font-weight: normal;
    src: local('Gilroy-Light'), url('../fonts/Gilroy-Light.woff') format('woff');
}

@font-face {
    font-family: 'Gilroy-Medium';
    font-style: normal;
    font-weight: normal;
    src: local('Gilroy-Medium'), url('../fonts/Gilroy-Medium.woff') format('woff');
}

@font-face {
    font-family: 'Gilroy-Regular';
    font-style: normal;
    font-weight: normal;
    src: local('Gilroy-Regular'), url('../fonts/Gilroy-Regular.woff') format('woff');
}

html {
  font-size: 14px;

}

body {
    font-family: 'Gilroy-Light';
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

.login-background {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-logo-container{
    position:absolute;
    top:60px;
    right:60px;
    display:flex;
    width:100%;
    justify-content:end;
}

.login-logo {
    width: 250px;
}

#header-logo {
    filter: drop-shadow(0px 0px 3px rgba(0,0,0,0.8));
}

.login-box {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 15px;
}

.login-box-logo {
    font-size: 2.1rem;
    font-weight: 300;
    margin-bottom: .9rem;
    text-align: center;
}

.btnLogin {
    text-decoration: none;
    border: 1px solid white;
    width: 200px;
    height: 60px;
    background-color: white;
    /* padding: 10px; */
    font-family: 'Segoe UI Semibold', 'Segoe UI';
    color: #0d4768 !important;
    font-size: 2rem;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    transition: all 0.1s ease-in;
}

.btnLogin:hover {
    text-decoration: none !important;
    
    transform:scale(1.05) 
}

.microsoft {
    height: 50%;
    margin-right: 20px;
}

.card {
    border:none !important;
    box-shadow: 0px 2px 8px 0px #dadada;
}

.folder-text{
    font-size:1rem;
    color : #000000;
}

.folder-button{
    height:60px;
    display:flex;
    flex-direction : row;
    justify-content:start;
    align-items: center;
    width:calc(25% - 1.15rem);
    cursor:pointer;
    transition: background-color 0.2s ease-in;
}

.folder-button.lock {
    width: auto !important;
    pointer-events: none !important;
}

.report-header {
    background-color: #0d4768;
    width: 100%;
    height: 70px;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.color-indicator {
    width: 25px;
    height: 8px;
    border-radius: 4px;
    box-shadow: 0px 0px 4px 0px #d1d1d1;
}
.bg-secondary {
    background-color: var(--secondary-color);
}

.folder-button:hover {
    background-color: #f2f2f2;
}

.download-button:hover {
    color: var(--primary-color) !important;
}

.folder-button-icon-container {
    height: 90%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.navbar-vertical .navbar-nav .nav-item .collapse .nav .nav-item .nav-link.active, .navbar-vertical .navbar-nav .nav-item .collapsing .nav .nav-item .nav-link.active {
    box-shadow: 0px 2px 6px 0px #dddddd !important;
    background-color: #0d4768 !important;
    color : white !important;
}

.dt-processing{
    background-color:white !important;
}

.page-item.active{
    z-index : 0 !important;
}

.edit-column {
    position: sticky;
    right: 0;
    background-color: white !important;
    z-index: 0;
    box-shadow: -1px 0px 0px -0px #cccccc !important;
}
.bg-grayed {
    background-color: #dcdcdc !important
}

.navbar-vertical .navbar-nav .nav-item .collapse .nav .nav-item .nav-link, .navbar-vertical .navbar-nav .nav-item .collapsing .nav .nav-item .nav-link {
    color: rgb(24 24 27) !important;
}
.navbar-vertical.bg-white .navbar-nav .nav-link .icon {
    background-image: none !important;
}

.navbar-vertical.navbar-expand-xs .navbar-nav .nav-link:hover {
    background-color: #f6f6f6 !important;
    border-radius: 10px !important;
}

.sidenav-header {
    height: 3.8rem !important;
}

.dt-search {
    margin-bottom: 2rem !important;
    padding:5px
}
div.dt-container div.dt-search{
    text-align:left !important;
}
.dt-info {
    margin-top: 15px;
    margin-bottom: 10px;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination > :first-child button {
    border-radius: 10px !important;
    width: 100px;
}

.pagination > :last-child button{
    border-radius: 10px !important;
    width: 100px;
}

.div.dt-container .dt-search input {
    border: 1px solid #f1f1f1 !important;
    border-radius: 7px !important;
    margin-left: 20px !important;
}

.div.dt-container .dt-search input:focus-visible {
    border: 3px solid #f1f1f1 !important;
}

.choices__inner{
    background-color:white !important;
    border-radius:10px !important;
}

.sync-button.disabled{
    pointer-events:none !important;
    opacity:0.5 !important;
}

.pages-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: #fbfbfb;
    padding: 10px;
    outline: 1px solid #8080806b;
    border-radius: 5px;
}

.pages-container.disabled {
    opacity:0.5;
    pointer-events:none;
}

.pages-list-item {
    border-radius: 5px;
    box-shadow: 0px 2px 6px 0px #f1f1f1;
    padding-right: 15px;
    padding-left: 15px;
    padding-bottom: 8px;
    background-color: #ffffff;
    padding-top: 8px;
    border: 1px solid #f1f1f1;
}

.page-item-visibility-button{
    cursor:pointer;
    transition:transform 0.1s ease-in;
}

.page-item-visibility-button:hover {
    transform: scale(1.1);
}

.page-selection-header {
    border-bottom-right-radius: 0px !important;
    border-top-right-radius: 0px !important;
    box-shadow: 0px 6px 8px 0px #dddddd;
    background-color: var(--secondary-color);
}

.page-selection-button {
    outline: 1px solid #e5e5e5;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
    color: black;
    transition: all 0.1s ease-in;
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
    cursor: pointer;
}

.sync-warning-container{
    display:flex;
    flex-direction:row;
    gap : 8px;
    color : orange !important;
    margin-top:20px !important;
    justify-content:start;
    align-items:center;
}

.page-selection-button:hover {
    font-weight: bold;
    background-color: #f2f2f2 !important;
    color: var(--primary-color) !important;
}

.page-selection-button.selected {
    font-weight: bold;
    background-color: #f2f2f2 !important;
    color: var(--primary-color) !important;
}

.back-button {
    transition: transform 0.1s ease-in;
}

.back-button:hover{
    transform:scale(1.1);
}

.favourite-icon.favourite {
    color: #FFD43B;
}
.favourite-icon.not-favourite {
    filter: drop-shadow(0px 0px 0.5px black);
    color: white !important;
  
}

.favourite-icon-container {
    transition: all 0.1s ease-in;
}

.favourite-icon-container:hover {
    transform: scale(1.1);
}

.favourite-icon-container.disabled{
    pointer-events:none;
    opacity:0.5;
}

.search-bubble-tag {
    position: absolute;
    left: 1rem; /* a little from the left */
    bottom: -16px; /* creeping under the header—adjust how much it peeks out */
    width: 40px;
    height: 40px;
    background-color: white; /* or matching theme, maybe a slightly contrasting border */
    border: 1px solid #ccc;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1100; /* higher than header so it's visible */
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

    .search-bubble-tag:hover {
        transform: scale(1.1);
    }

.content-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    z-index: 900; /* less than search-drop if search-drop has z-index > 900 */
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.content-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-drop {
    position: absolute;
    top: 100px; 
    left: 0;
    right: 0;
    background-color: white;
    border-bottom: 1px solid #ddd;
    height: 0;
    overflow: hidden;
    z-index: 1000; 
    transition: height 0.3s ease;
}

.form-check:not(.form-switch) .form-check-input[type=checkbox]:after {
    color: #daaa00 !important;
}

.search-result-item {
    gap: 1rem;
    justify-content: start;
    align-items: center;
    display: flex;
}

.search-drop.dropdown-visible {
    overflow:visible !important;
}

#loading-overlay {
    position: fixed;
    top: 0px;
    left: 0px;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display:flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.search-loading {
    padding: 0.5rem;
    text-align: center;
    font-style: italic;
    color: #666;
    display:flex;
    flex-direction : row;
    align-items:center;
    justify-content:center;
    gap:10px;
}

.search-results-dropdown ul li {
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.search-results-dropdown ul li:hover {
    background-color: #f0f0f0;
}

.search-results-dropdown {
    position: absolute;
    top: 100%; 
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1001;
    /* hidden by default */
    display: none;
}

.search-drop.open {
    height: 60px; 
}

.search-drop .container {
    height: 100%;
    display: flex;
    align-items: center;
}

.search-input {
    flex: 1;
    margin-right: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.btn-close-search {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #333;
}

.page-list-flex{
    flex-direction:column;
    width:100%;
    align-items:end;
    flex-wrap : nowrap;
    overflow:auto;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #FFF;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

.page-list-buttons-container{
    display:flex;
    flex-direction:column;
    flex-wrap: wrap;
    width:100%;

}

.page-list-buttons-container > div {
    flex: 1 1 50%;
    box-sizing: border-box;
    outline: 1px solid #e5e5e5;
    cursor:pointer;
    font-size: 0.8rem !important;
}

.page-list-buttons-container > div > p {

    font-size: 0.8rem !important;
}

    .page-list-buttons-container > div:hover {
        color: var(--primary-color) !important;
        font-weight: bold;
    }

.page-list-buttons-container > div > p,
.page-list-buttons-container > div > i {
    white-space: nowrap;
}

.navbar-vertical .navbar-nav > .nav-item .nav-link.active .icon {
    background-image: none !important;
}

.background-white {
    background-color: white !important;
}

.navbar-vertical.background-white {
    box-shadow: 0 20px 27px 0 rgba(0, 0, 0, .05);
}

.loader.page-list-loader {
    border: 5px solid var(--primary-color) !important;
    border-bottom-color: transparent !important;
}

/* Antes era dourado fixo (#daaa00); passa a seguir a cor primária do portal */
.form-check:not(.form-switch) .form-check-input[type=radio]:checked:after {
    background-color: var(--primary-color) !important;
}

.form-check-input:checked[type=checkbox], .form-check-input:checked[type=radio] {
    outline: 2px solid var(--primary-color) !important;
}

.custom-name-save-button {
    transition: transform 0.1s ease-in;
}

.custom-name-save-button:hover {
    transform:scale(1.1);
}

.custom-name-save-button.disabled{
    pointer-events:none;
    opacity:0.5;
}

.nav-access-wrapper{
    width:300px;
}

.file-input-container {
    width: fit-content;
}

.file-import-input {
    width: fit-content;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
} 

@media (max-width: 768px) {
    .login-logo {
        width:45%
    }

    .login-logo-container{
        justify-content:center !important;
        right:0px;
    }

    .page-selection-header{
        width:100%;
    }

    .page-selection-button{
        width:auto;
    }

    .page-list-flex {
        flex-direction: row;
        align-items: center !important;
        flex-wrap: wrap !important;
    }
}

@media(max-width : 575px){
    .folder-button{
        width:100% !important;
    }
}

@media (min-width: 576px) and (max-width: 768px) {
    .folder-button {
        width: calc(50% - 0.75rem) !important;
    }
}

@media (min-width: 767px) and (max-width: 991px) {
    .folder-button {
        width: calc(33.3% - 1rem) !important;
    }
}

/* PowerBI layout fixes */
.powerbi-container {
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#powerbi-div {
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    display: block;
}

    #powerbi-div iframe,
    .powerbi-iframe {
        width: 100%;
        height: 100%;
        border: 0;
        display: block;
    }

/* Imagem decorativa: camada do tamanho do primeiro ecrã, item posicionado por âncora (ver DecorationStyleViewModel.GetItemStyle) */
.decoration-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.decoration-item {
    position: absolute;
}

.decoration-item > img {
    display: block;
    height: 100%;
    width: auto;
}

/* Com cor, a imagem fica invisível só para dar o tamanho e serve de máscara */
.decoration-item > .decoration-mask {
    position: absolute;
    inset: 0;
}

.decoration-mask {
    -webkit-mask-image: var(--decoration-url);
    mask-image: var(--decoration-url);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

/* Estilo do backoffice (Configurações > Estilo > Backoffice): as variáveis vêm da sidebar */
.backoffice-themed .icon.bg-secondary {
    background-color: var(--bo-button-color, var(--secondary-color)) !important;
}

.backoffice-themed .icon.bg-grayed {
    background-color: var(--bo-button-inactive-color, #dcdcdc) !important;
}

.backoffice-themed .nav-link-text,
.backoffice-themed .navbar-brand span,
.backoffice-themed h6,
.backoffice-themed .bo-text {
    color: var(--bo-text-color, #000) !important;
}

/* Páginas do backoffice: tabs e botões seguem Estilo > Backoffice (variáveis definidas no :root do layout) */
.backoffice-page main .nav-tabs .nav-link,
.backoffice-page main .nav-pills .nav-link {
    color: var(--bo-text-color) !important;
}

.backoffice-page main .nav-tabs .nav-link.active {
    border-bottom: 2px solid var(--bo-button-color);
}

.backoffice-page main .btn.bg-primary,
.backoffice-page main .btn.bg-gradient-dark {
    background-image: none !important;
    background-color: var(--bo-button-color) !important;
}

.backoffice-page main .btn-outline-secondary {
    color: var(--bo-text-color);
    border-color: var(--bo-button-inactive-color);
}

.backoffice-page main .btn-check:checked + .btn-outline-secondary {
    color: #fff;
    background-color: var(--bo-button-color);
    border-color: var(--bo-button-color);
}

/* Paginação das tabelas no backoffice: números e setas com a cor da letra, página atual com a cor dos botões */
.backoffice-page main .pagination {
    --bs-pagination-color: var(--bo-text-color);
    --bs-pagination-hover-color: var(--bo-text-color);
    --bs-pagination-focus-color: var(--bo-text-color);
    --bs-pagination-focus-box-shadow: none;
    --bs-pagination-active-color: #fff;
    --bs-pagination-active-bg: var(--bo-button-color);
    --bs-pagination-active-border-color: var(--bo-button-color);
}

.backoffice-page main .page-item .page-link {
    color: var(--bo-text-color);
}

.backoffice-page main .page-item.active .page-link {
    background-image: none !important;
    background-color: var(--bo-button-color) !important;
    border-color: var(--bo-button-color) !important;
    color: #fff !important;
}

/* Radios, checkboxes, interruptores e sliders no backoffice: cor dos botões em vez do laranja/amarelo do tema */
.backoffice-page main .form-check-input:focus {
    border-color: var(--bo-button-color) !important;
    box-shadow: none !important;
}

.backoffice-page main .form-check-input:checked {
    background-color: var(--bo-button-color) !important;
    border-color: var(--bo-button-color) !important;
}

/* O tema pinta o radio selecionado com um gradiente escuro; o ponto branco vem do :after do tema */
.backoffice-page main .form-check-input[type="radio"]:checked {
    --bs-form-check-bg-image: none;
    background-image: none !important;
}

.backoffice-page main .form-range::-webkit-slider-thumb {
    background: var(--bo-button-color) !important;
}

.backoffice-page main .form-range::-moz-range-thumb {
    background: var(--bo-button-color) !important;
}

.backoffice-page main .form-range:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--bo-button-color) 25%, transparent) !important;
}

.backoffice-page main .form-range:focus::-moz-range-thumb {
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--bo-button-color) 25%, transparent) !important;
}

/* No backoffice: sem contorno nos radios/checkboxes marcados e ponto do radio branco sobre a cor dos botões */
.backoffice-page main .form-check-input:checked[type=checkbox],
.backoffice-page main .form-check-input:checked[type=radio] {
    outline: none !important;
}

.backoffice-page main .form-check:not(.form-switch) .form-check-input[type=radio]:checked:after {
    background-color: #fff !important;
}

/* O visto da checkbox era amarelo (regra geral do portal); no backoffice fica branco sobre a cor dos botões */
.backoffice-page main .form-check:not(.form-switch) .form-check-input[type=checkbox]:after {
    color: #fff !important;
}

/* Imagem pintada com uma cor (ex.: logo SVG do backoffice): com .is-tinted a imagem fica invisível e serve de máscara ao ::after */
.tinted-image {
    position: relative;
    display: inline-block;
}

.tinted-image.is-tinted > img {
    visibility: hidden;
}

.tinted-image.is-tinted::after {
    content: "";
    position: absolute;
    inset: 0;
    background-color: var(--tint-color);
    -webkit-mask: var(--tint-url) center / contain no-repeat;
    mask: var(--tint-url) center / contain no-repeat;
}

/* Referência à B2F (criador do produto) no login e no backoffice */
.b2f-copyright {
    font-size: 0.7rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
    pointer-events: none;
}

/* No login o fundo é configurável: pastilha escura translúcida para ser legível com qualquer cor ou imagem */
.b2f-copyright-login {
    position: fixed;
    bottom: 16px;
    right: 16px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.b2f-copyright-backoffice {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--bo-text-color, #000);
    opacity: 0.85;
}

/* Botão mostrar/esconder password (site.js) */
.password-toggle-wrap {
    position: relative;
}

.password-toggle-wrap > input {
    padding-right: 2.5rem !important;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    padding: 4px;
    line-height: 1;
    color: #6c757d;
    cursor: pointer;
}

.password-toggle:hover {
    color: #344767;
}

/* Abas da página principal (Catálogo de Relatórios / Relatórios Ad-hoc) */
.main-tabs-bar {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid #e4e4e4;
}

.main-tabs {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    overflow-x: auto;
}

.main-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1rem;
    color: #67748e;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: color 0.15s ease-in, border-color 0.15s ease-in;
}

.main-tab:hover {
    color: #000000;
}

.main-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Relatórios Ad-hoc */
.adhoc-btn {
    border-radius: 8px;
    text-transform: none;
    font-size: 0.875rem;
}

.adhoc-notebook-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.adhoc-notebook-description {
    color: #67748e;
    font-size: 0.875rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.adhoc-notebook-footer {
    margin-top: auto;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.adhoc-meta {
    font-size: 0.8rem;
    color: #67748e;
}

.adhoc-run-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
}

.adhoc-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.adhoc-status.queued { background-color: #eef0f3; color: #505a6b; }
.adhoc-status.running { background-color: #e3f2fd; color: #0b5ea8; }
.adhoc-status.completed { background-color: #e5f5e8; color: #1e7b34; }
.adhoc-status.failed { background-color: #fdeaea; color: #b3261e; }

.adhoc-table th {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #67748e;
    font-weight: 700;
    border-bottom-width: 1px;
}

.adhoc-table td {
    font-size: 0.875rem;
    color: #000000;
}

.adhoc-table > :not(caption) > * > * {
    padding: 0.75rem 1rem;
}

.adhoc-params-cell {
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #67748e !important;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.8rem !important;
}

.adhoc-icon-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: #353a49;
    transition: background-color 0.15s ease-in;
}

.adhoc-icon-button:hover {
    background-color: #eef0f3;
    color: var(--primary-color);
}

/* Pedidos de relatório: a linha abre o detalhe; a ação da direita depende do estado */
.adhoc-execution-row {
    cursor: pointer;
}

.adhoc-execution-row:hover > td {
    background-color: #f7f8fa;
}

.adhoc-row-highlight > td {
    background-color: #eaf4fb;
}

.adhoc-row-highlight > td:first-child {
    box-shadow: inset 3px 0 0 var(--primary-color);
}

.adhoc-row-action {
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
}

.adhoc-row-link {
    font-size: 0.8rem;
    font-weight: 600;
}

.adhoc-row-link-error {
    color: #b3261e;
}

.adhoc-row-link-error:hover {
    color: #8c1d17;
}

.adhoc-row-processing {
    font-size: 0.8rem;
    color: #67748e;
}

.adhoc-queue-position {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #67748e;
}

.adhoc-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #67748e;
}

.adhoc-breadcrumb a {
    color: #67748e;
}

.adhoc-breadcrumb a:hover {
    color: var(--primary-color);
}

.adhoc-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #000000;
    margin-left: 0;
}

.adhoc-param-name {
    margin-left: 0.4rem;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.72rem;
    font-weight: normal;
    color: #8392ab;
}

.adhoc-switch {
    padding-top: 2rem;
}

.adhoc-form-error,
.adhoc-error-box {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background-color: #fdeaea;
    border: 1px solid #f3c1bd;
    color: #b3261e;
    font-size: 0.875rem;
}

.adhoc-error-box i {
    margin-top: 0.2rem;
}

.adhoc-execution-item {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    border: 1px solid #f1f1f1;
    transition: background-color 0.15s ease-in;
}

.adhoc-execution-item:hover {
    background-color: #f6f6f6;
}

.adhoc-steps {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
}

.adhoc-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    min-width: 110px;
}

.adhoc-step-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #eef0f3;
    color: #ffffff;
    font-size: 0.8rem;
    border: 2px solid #dfe3e8;
}

.adhoc-step.done .adhoc-step-dot { background-color: #2d9135; border-color: #2d9135; }
.adhoc-step.current .adhoc-step-dot { background-color: #0b5ea8; border-color: #0b5ea8; }
.adhoc-step.failed .adhoc-step-dot { background-color: #b3261e; border-color: #b3261e; }

.adhoc-step-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #000000;
}

.adhoc-step-time {
    font-size: 0.75rem;
    color: #8392ab;
    min-height: 1.1rem;
}

.adhoc-step-line {
    flex: 1;
    height: 2px;
    margin-top: 15px;
    background-color: #dfe3e8;
}

.adhoc-step-line.done { background-color: #2d9135; }
.adhoc-step-line.failed { background-color: #b3261e; }

.adhoc-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.adhoc-info {
    display: flex;
    flex-direction: column;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background-color: #f8f9fa;
    min-width: 0;
}

.adhoc-info-label {
    font-size: 0.75rem;
    color: #67748e;
}

.adhoc-info-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #000000;
}

.adhoc-log {
    background-color: #1e2330;
    color: #d6dbe4;
    border-radius: 8px;
    padding: 1rem;
    font-size: 0.8rem;
    line-height: 1.6;
    max-height: 360px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.adhoc-log-error {
    color: #ff8a80;
    font-weight: 600;
}

@media (max-width: 575px) {
    .adhoc-step {
        min-width: 80px;
    }
}

/* Ad-hoc: lista de reports, sub-navegação e detalhe (mesmo aspeto do catálogo) */
.adhoc-subnav {
    display: inline-flex;
    gap: 0.25rem;
    padding: 0.25rem;
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow: 0px 2px 8px 0px #dadada;
}

.adhoc-subnav-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    border-radius: 8px;
    color: #67748e;
    font-size: 0.9rem;
    font-weight: 600;
    transition: background-color 0.15s ease-in;
}

.adhoc-subnav-item:hover {
    color: #000000;
    background-color: #f2f2f2;
}

.adhoc-subnav-item.active {
    color: #ffffff;
    background-color: var(--primary-color);
}

/* Cabeçalho das páginas Ad-hoc: título com contagem e subtítulo */
.adhoc-page-count {
    color: #8392ab;
    font-size: 1rem;
    font-weight: 400;
}

.adhoc-page-subtitle {
    margin: 0.25rem 0 0;
    color: #67748e;
    font-size: 0.9rem;
}

/* Pedidos de relatório: cartão da tabela, pesquisa e cabeçalhos mais discretos */
.adhoc-history-card {
    border: 0;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(20, 40, 80, 0.07);
}

.adhoc-history-card .dt-search input {
    min-width: 220px;
    border-radius: 8px;
}

.adhoc-history-card .adhoc-table th {
    text-transform: none;
    font-weight: 600;
    background-color: #f8f9fb;
    border-bottom: 1px solid #edf0f4;
}

.adhoc-history-card .adhoc-table td {
    border-bottom: 1px solid #f0f2f5;
}

.adhoc-back {
    color: #353a49;
    font-size: 1.1rem;
}

.adhoc-back:hover {
    color: var(--primary-color);
}

.adhoc-detail-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #8392ab;
}

.adhoc-detail-value {
    font-size: 1.05rem;
    color: #353a49;
    margin-bottom: 1rem;
}

.adhoc-field {
    min-width: 220px;
}

/* Os campos estão alinhados pelo topo: o interruptor e o botão (sem etiqueta por cima) descem a altura da etiqueta
   (cerca de 2rem) para ficarem à altura dos inputs */
.adhoc-field .adhoc-switch {
    padding-top: 0;
    margin-top: 2rem;
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.adhoc-generate {
    height: 40px;
    margin-top: 2rem;
}

/* Cabeçalho da pasta aberta (_FolderHeader), igual no Catálogo de Relatórios e nos Relatórios Ad-hoc */
.folder-header {
    position: relative;
    overflow: hidden;
    margin: 0.35rem 2rem 0;
    min-height: 115px;
    display: flex;
    align-items: center;
    border-radius: 12px;
    background-color: color-mix(in srgb, var(--folder-color) 10%, #ffffff);
}

.folder-header-cubes {
    position: absolute;
    top: 0;
    right: 0;
    width: 420px;
    height: 100%;
    color: var(--folder-color);
    fill: currentColor;
    opacity: 0.12;
    pointer-events: none;
}

.folder-header-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

.folder-header-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 14px;
    background-color: var(--folder-color);
    color: #ffffff;
    font-size: 1.6rem;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--folder-color) 30%, transparent);
}

.folder-header-text {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.folder-header-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    width: fit-content;
    color: #67748e;
    font-size: 0.95rem;
}

.folder-header-back i {
    font-size: 0.75rem;
}

.folder-header-back:hover {
    color: var(--folder-color);
}

.folder-header-path {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.6rem;
    line-height: 1.2;
    color: #1f2d3d;
}

.folder-header-path a {
    color: #67748e;
}

.folder-header-path a:hover {
    color: var(--folder-color);
}

.folder-header-path .folder-header-home {
    color: #1f2d3d;
    font-size: 1.35rem;
}

.folder-header-separator {
    color: #8392ab;
    font-weight: 300;
}

.folder-header-current {
    font-weight: 500;
}

@media (max-width: 767px) {
    .folder-header {
        margin: 0.35rem 1rem 0;
    }

    .folder-header-cubes {
        width: 45%;
    }

    .folder-header-content {
        gap: 1rem;
    }

    .folder-header-icon {
        width: 52px;
        height: 52px;
        font-size: 1.3rem;
    }

    .folder-header-path {
        font-size: 1.25rem;
    }
}

/* Cartões dos relatórios: o mesmo tamanho no Catálogo (Power BI) e nos Relatórios Ad-hoc */
.report-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(400px, 100%), 1fr));
    gap: 1.5rem;
}

.report-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.25rem;
    min-height: 160px;
    padding: 1.1rem 1.25rem 1.4rem;
    border: 0;
    border-radius: 12px;
    background-color: #ffffff;
    box-shadow: 0 4px 18px rgba(20, 40, 80, 0.07);
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.report-card:hover {
    box-shadow: 0 8px 24px rgba(20, 40, 80, 0.12);
    transform: translateY(-2px);
}

.report-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
}

.report-card-title {
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1rem;
    font-weight: 500;
    color: #1f2d3d;
}

.report-card-actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 0.9rem;
}

.report-card-body {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.report-card-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
}

.report-card-icon.powerbi {
    background-color: #fdf3cf;
}

.report-card-icon.powerbi img {
    width: 36px;
    height: 36px;
}

.report-card-icon.adhoc {
    color: var(--notebook-color, var(--primary-color));
}

.report-card-icon.adhoc svg {
    width: 46px;
    height: 54px;
}

.report-card-type {
    flex: 1;
    font-size: 1.75rem;
    font-weight: 500;
    color: #1f2d3d;
}

.report-card-chevron {
    color: #8392ab;
}
