
html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}
.btn-primary {
  
 color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}
a {
    color: #0077cc;
}

/* Botó gris fosc */
.btn-dark-grey {
    font-family: "Inter", sans-serif;
    font-weight: 500;
    background-color: #343A40;
    border-color: #343A40;
    color: #FFFFFF;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
}

    .btn-dark-grey:hover {
        background-color: #495057;
        border-color: #495057;
    }

    .btn-dark-grey:focus,
    .btn-dark-grey.focus {
        box-shadow: 0 0 0 0.2rem rgba(52, 58, 64, 0.5);
    }

    .btn-dark-grey:disabled,
    .btn-dark-grey.disabled {
        background-color: #343A40;
        border-color: #343A40;
        opacity: 0.65;
    }

.btn-soft-danger {
    background-color: #cc6d10;
    color: white;
    border: 1px solid #cc6d10;
}

    .btn-soft-danger:hover {
        background-color: #99510b;
        color: white;
    }

.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;
}
.btn-circle {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.btn-close.white {
    filter: invert(1); /* Canvia negre per blanc */
}
html {
    position: relative;
    min-height: 100%;
}

body {
    margin: 0;
    padding-top: 0px; /* Ajustat per coincidir amb l'alçada de la barra superior */
    font-family: "Inter", sans-serif;
    font-weight: 400; /* Regular per al contingut general */
}
.border-top {
    border-top: 1px solid #e5e5e5;
}

.border-bottom {
    border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}
header.fixed-top {
    background-color: #fff; /* Per assegurar-nos que tingui fons */
    z-index: 1000; /* Perquè estigui per sobre d’altres elements */
}

main {
    min-height: calc(100vh - 200px); /* Resta l’alçada del header i footer si cal */
}
label {
    font-weight: 100;
    font-size: 0.72rem;
    color: #847960;
    margin-bottom: 0px;
    display: inline-block; /* per controlar millor el marge */
}


.table-container {
    max-height: calc(100vh - 250px);
    overflow-y: auto; /* Activa el desplaçament vertical */
    position: relative;
}

/* Títols de la taula fixos */
.table thead th {
    position: sticky;
    top: 0;
    background-color: white; /* Per evitar transparències */
    z-index: 10; /* Per sobre del contingut de la taula, però per sota del sticky-top */
    font-weight: lighter;
    color: #5d89a0;
    font-size:0.8rem;
}

.table td {
    color: #505050; /* o prova #495057 per un gris més fosc */
    font-size:0.90rem;
}

.table-comptable tbody td {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    vertical-align: top; /* per defecte a dalt si vols */
}

.table-comptable tbody tr {
    border-bottom: 1px solid #dee2e6; /* gris Bootstrap */
}


.dropdown-indicator {
    background-image: url("data:image/svg+xml;charsetUTF8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23808080' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}


.factura-form-container {
    height: calc(100vh - 150px); /* Resta l’alçada del <header> fix */
    display: flex;
    flex-direction: column;
}

.factura-header {
    background-color: #f8f9fa;
    padding: 10px;
    border-bottom: 1px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
}

.factura-scrollable {
    flex: 1; /* Ocupa l’espai restant */
    overflow-y: auto; /* Activa el scroll vertical */
    padding: 10px;
}

.factura-section {
    margin-bottom: 20px;
}

.factura-footer {
    background-color: #f8f9fa;
    padding: 10px;
    border-top: 1px solid #dee2e6;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.despesa-line, .impostos-line, .retencions-line {
    margin-bottom: 10px;
}


select {
    font-family: "Inter", sans-serif;
    font-size: 0.95rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    background-color: #ffffff;
    color: #666;
    transition: border-color 0.2s ease-in-out;
}

select:focus {
    border-color: #2070b1;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(32, 112, 177, 0.25);
    }
select optgroup {
    font-weight: 500; /* o 400 o lighter */
    color: #666; /* més suau que negre */
   
}
select optgroup::before {
        content: '— ';
    }
.form-select.fletxa-esquerra {
    /* Canvia la posició de la fletxa a l'esquerra */
    background-position: left 0.75rem center;
    /* Ajusta el padding perquè el text no se superposi amb la fletxa */
    padding-left: 2.5rem; /* Espai per a la fletxa a l'esquerra */
    padding-right: 0.75rem; /* Redueix el padding a la dreta */
}




optgroup[label] {
    font-weight: 500;
    color: #6b7280; /* Tailwind gray-500 */
}


input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

input.no-datepicker::-webkit-calendar-picker-indicator {
    display: none;
}
#pdf-viewer {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    overflow-x: hidden;
    padding: 10px 0;
}

    #pdf-viewer canvas {
        max-width: 100%;
        height: auto !important;
        display: block;
        margin: 0 auto;
    }

.form-control {
    color: #404040; /* gris fosc */
   
}

    /* Estat focus */
    .form-control:focus {
       
    }

    /* Placeholder */
    .form-control::placeholder {
        color: lightgray;
        opacity: 1;
    }

/* Si vols també selects de Bootstrap 5 (classe diferent) */
.form-select {
   
}

/* Si vols més alçada (inputs) */
.form-control {
  
  
}

.submenu-compact .nav-link {
    padding-top: 0.1rem;
    padding-bottom: 0.1rem;
    /* si vols, també font-size aquí en lloc d’inline */
    /* font-size: 0.9rem; */
}

.submenu-compact .nav-item {
    margin-bottom: 0; /* per evitar separació extra */
}

.form-check-lg .form-check-input {
    width: 1.2rem;
    height: 1.2rem;
    margin-top: 0; /* perquè quedi centrat amb el text */
}

.form-check-lg .form-check-label {
    font-size: 1rem; /* text una mica més gran */
    font-weight: 500; /* semi-negreta tipus label important */
    margin-left: 0.25rem; /* petit espai entre radio i text */
}

.inicial-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem; /* mida fixa */
    height: 2rem; /* mateixa mida => cercle perfecte */
    border-radius: 50%;
    font-weight: 300; /* lighter */
    font-size: 1.1rem;
    line-height: 1; /* evita que l'alçada variï pel line-height */
    background-color: darkslategray;
    opacity:0.6;
}