﻿
/*HEADER*/
/* Estilos para el header */

/*BOTONES*/
.btn {
    border: 2px solid #27436e;
    background: transparent;
    color: #27436e;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease-in-out;
}

    .btn:hover,
    .btn.active,
    .btn:focus,
    .btn:active:focus,
    .btn-link.nav-link:focus {
        background-color: #27436e !important;
        color: white;
        box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #27436e !important;
    }

.btn-header-white {
    background: transparent;
    border: 1px solid #fff;
    border-radius: 3px;
    color: #fff;
    padding: 5px 10px;
    font-size: 16px;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin-right: 5px;
}
    .btn-header-white:hover, .btn-header-white:focus, .btn-header-white:active:focus, .btn-header-white.nav-link:focus {
        background-color: white !important;
        color: black;
        box-shadow: 0 0 0 0.1rem black, 0 0 0 0.25rem white !important;
    }
    .btn-header-white option {
        color: #000;
    }

/*FORMULARIO*/
input.form-control,
select.form-control,
textarea.form-control {
    border: 2px solid #27436e;
    background: transparent;
    color: #27436e;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease-in-out;
}

    input.form-control:focus,
    select.form-control:focus,
    textarea.form-control:focus {
        background-color: #27436e !important;
        color: white;
        box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #27436e !important;
    }

label {
    font-size: 14px;
    color: #27436e;
}

.error {
    color: red;
    padding-top: 1px;
    font-size: 12px;
}

/*ARCHIVOS*/
/* Estilos comunes para iframe e imagen */
.archivo-visor {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 500px; /* puedes ajustar el alto */
    overflow: hidden;
    padding: 0;
    text-align: center;
}

#visorArchivo[type="img"] {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    margin: auto;
    border: none;
}

/*CARD OBRAS*/
.card-header-obras {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0px;
}


.btn-obras-header {
    display: flex;
}

.card-header-encargo {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0px;
}
.header-avisos-encargo {
    display: flex;
}

/*MODAL*/
.modal-regal {
    border-radius: 16px;
    background-color: #f8f9fa;
    border: 2px solid #27436e;
    box-shadow: 0 0 25px rgba(39, 67, 110, 0.25);
    overflow: visible;
}

    .modal-regal .modal-header {
        background-color: #27436e;
        color: white;
        border-bottom: 1px solid #ddd;
        padding: 0.8rem 1.2rem;
    }

    .modal-regal .modal-title {
        font-weight: 600;
        font-size: 1rem;
        text-align: center;
    }

    .modal-regal .modal-body {
        padding: 1.25rem;
        min-height: 100px;
    }

    .modal-regal .modal-footer {
        padding-bottom: 0px;
        padding-top: 1rem;
    }

.modal-header-custom {
    display: flex;
    align-items: center; /* Centrado vertical */
    justify-content: center; /* Centra el título */
    padding: 0.75rem 1.25rem;
    position: relative;
    background-color: #27436e;
    color: white;
}

    .modal-header-custom .cerrar-modal {
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        cursor: pointer;
        transition: transform 0.3s ease, color 0.3s ease;
        color: white;
    }

        .modal-header-custom .cerrar-modal:hover {
            transform: translateY(-50%) scale(1.2) rotate(90deg);
            color: #ffdddd;
        }

/*GENERAL FORMS*/
button.btn-primary {
    background-color: #27436e;
    border-color: #27436e;
}

    button.btn-primary:hover {
        background-color: #1d3554;
        border-color: #1d3554;
    }

.text-end {
    text-align: right;
}

/*ICONOS*/
.icon {
    color: #27436e;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease-in-out;
    margin: 0px !important;
    padding-inline: 2px;
}

    .icon:hover,
    .icon.active,
    .icon:focus,
    .icon:active:focus,
    .icon.nav-link:focus {
        color: #3b5b90;
    }

/*HTML Y BODY*/
html {
    height: 100%;
    background-color: #fff;
}

body {
    min-height: 100vh; /* Altura mínima de la ventana */
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    font-size: 14px;
    font-family: Arial, Helvetica, sans-serif;
    background-color: #fff;
}

header, footer {
    flex: 0 0 auto;
}

main {
    flex: 1 0 auto;
}

.logo-layout {
    height: 70px;
}

/*LOGIN*/
.login-container {
    max-width: 400px;
    width: 100%;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.no-click {
    cursor: default;
    user-select: none;
}

/*LISTADO ENCARGOS*/
.action-btn {
    border: none;
    background-color: transparent;
}

    .action-btn:focus,
    .action-btn:active {
        outline: none;
        border: none;
        box-shadow: none;
    }

.search-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.card-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Rejilla comun para los listados principales de gestion. */
.gestion-card-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    width: 100%;
    min-width: 0;
}

.gestion-card-grid .gestion-card-item,
.gestion-card-grid > .card-custom {
    width: 100%;
    min-width: 0;
    height: 100%;
    margin: 0;
}

.gestion-card-grid .card,
.gestion-card-grid .card-content,
.gestion-card-grid .card-body {
    min-width: 0;
}

.gestion-card-grid .card-header-obras,
.gestion-card-grid .card-header-encargo {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: .5rem;
}

.gestion-card-grid .btn-obras-header {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    width: 100%;
}

.gestion-card-grid .btn-obras-header .btn {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0 !important;
    padding: .4rem .55rem !important;
    white-space: normal;
}

.gestion-card-grid .card-title,
.gestion-card-grid .card-encargos,
.gestion-card-grid .card-enunciados {
    overflow-wrap: anywhere;
}

@media (min-width: 768px) {
    .gestion-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1200px) {
    .gestion-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1600px) {
    .gestion-card-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Encargos y obras contienen mas informacion: nunca se muestran mas de dos por fila. */
.gestion-card-grid.encargos-card-grid,
.gestion-card-grid.obras-card-grid,
.gestion-card-grid.operarios-card-grid {
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 768px) {
    .gestion-card-grid.encargos-card-grid,
    .gestion-card-grid.obras-card-grid,
    .gestion-card-grid.operarios-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.card-header {
    border-bottom: 2px solid #27436e;
    padding-bottom: 5px;
    margin-bottom: 10px;
    font-weight: bold;
    color: #27436e;
    font-size: 1.1rem;
    background-color: #f5f6f7;
}

.card-enunciados {
    font-weight: 600;
    color: #1a1a1a;
}

.card-custom {
    background-color: #f5f6f7;
    box-shadow: 2px 2px 6px rgba(27, 64, 106, 0.3);
    border-radius: 8px;
    padding: 15px;
    position: relative;
}

.card-encargos {
    color: #333;
    font-weight: 400;
    font-size: 13px;
}

.card-content {
    flex-grow: 1;
}

.btn-group-custom {
    position: absolute;
    right: 15px;
    top: 60%;
    transform: translateY(-50%);
    display: flex;
    gap: 10px;
}

.btn-container {
    display: flex;
    flex-wrap: wrap; /* Permite ajustar los botones en varias líneas si es necesario */
    justify-content: center;
    margin-bottom: 15px;
    gap: 10px;
}

.encargos-select-filters .bootstrap-select {
    width: 100% !important;
}

.encargos-count-summary {
    align-items: center;
    background: #f5f6f7;
    border: 1px solid rgba(39, 67, 110, 0.2);
    border-radius: 6px;
    color: #1a1a1a;
    display: inline-flex;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
}

.encargos-count-summary strong {
    color: #27436e;
}

.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-flex;
    max-width: 88%; /* ajusta según tus necesidades */
}

/* Botón de subir */
#btnScrollTop {
    position: fixed;
    bottom: max(1rem, env(safe-area-inset-bottom));
    right: max(1rem, env(safe-area-inset-right));
    cursor: pointer;
    display: block;
    z-index: 1000;
    padding: 0;
    border: 0;
    background: transparent;
    color: #27436e;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(.5rem);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

#btnScrollTop.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

#btnScrollTop:focus-visible {
    outline: 3px solid rgba(39, 67, 110, .35);
    outline-offset: 4px;
    border-radius: 50%;
}

#btnScrollTop > i {
    display: block;
    font-size: 3.25rem;
    line-height: 1;
}

/*DETALLES ENCARGO*/
.btnBack {
    position: fixed;
    bottom: 5%;
    left: 2%;
    z-index: 1000;
}

.encargo-container {
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #fff;
    margin-bottom: 20px;
}

.encargo-header {
    background-color: #dc3545; /* Banda roja */
    border-start-end-radius: 5px;
    border-start-start-radius: 5px;
    color: #fff;
    padding-right: 15px;
    padding-left: 15px;
    padding-bottom: 5px;
    padding-top: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.header-left {
    display: block;
    align-items: center;
}

.header-title {
    font-size: 18px;
    font-weight: bold;
    margin-right: 10px;
}

.header-right {
    display: block;
    align-items: center;
    cursor: auto;
}

    .header-right label {
        margin-top: 5px;
        margin-right: 10px;
        font-weight: bold;
    }

.select-gremio {
    background: transparent;
    border: 1px solid #fff;
    border-radius: 3px;
    color: #fff;
    padding: 5px 10px;
    font-size: 16px;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

    .select-gremio:hover, .select-gremio:focus, .select-gremio:active:focus, .select-gremio.nav-link:focus {
        background-color: white !important;
        color: black;
        box-shadow: 0 0 0 0.1rem black, 0 0 0 0.25rem white !important;
    }

    .select-gremio option {
        color: #000;
    }

.btn-crearnota {
    background: transparent;
    border: 1px solid #fff;
    border-radius: 3px;
    color: #fff;
    padding: 5px 10px;
    font-size: 16px;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

    .btn-crearnota:hover, .btn-crearnota:focus, .btn-crearnota:active:focus, .btn-crearnota.nav-link:focus {
        background-color: white !important;
        color: black;
        box-shadow: 0 0 0 0.1rem black, 0 0 0 0.25rem white !important;
    }

.nro-siniestro-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-copiar {
    background-color: transparent;
    border: none;
    color: #27436e;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
}

    .btn-copiar:hover {
        color: #3b5b90;
    }

.encargo-body {
    padding: 15px;
}

.info-line {
    display: flex;
    flex-wrap: wrap; /* Para que se adapte en pantallas pequeñas */
}

.info-col {
    flex: 0 0 33%;
    box-sizing: border-box;
    padding: 5px;
}

.info-col-large {
    flex: 0 0 66%;
    box-sizing: border-box;
    padding: 5px;
}

.section-title {
    margin-top: 3%;
    font-weight: bolder;
    font-family: 'Sans Serif Collection';
    font-style: normal;
    margin-bottom: 2px;
    font-size: 20px;
}

.info-label {
    font-weight: bold;
    margin-right: 5px;
}

.line-separator {
    border-top: 2px solid #dc3545;
    margin-bottom: 15px;
}

.line-separator-s {
    border-top: 1px solid #dc3545;
    margin-bottom: 35px;
}

/* Resumen del detalle de un encargo: aprovecha el ancho sin alturas artificiales. */
.encargo-detalle-resumen {
    margin-bottom: .75rem;
}

.encargo-detalle-resumen .encargo-detalle-toolbar {
    min-height: 2.25rem;
    justify-content: flex-end;
    padding: .25rem .4rem;
    cursor: default;
}

.encargo-detalle-resumen .encargo-detalle-acciones {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: .3rem;
}

.encargo-detalle-resumen .encargo-accion {
    position: relative;
    display: inline-flex;
    min-height: 1.75rem;
    margin: 0;
    padding: .2rem .45rem;
    align-items: center;
    justify-content: center;
    gap: .3rem;
    font-size: .75rem;
    line-height: 1;
    white-space: nowrap;
}

.encargo-detalle-resumen .encargo-accion i {
    min-width: auto;
    min-height: auto;
    font-size: .75rem;
}

.encargo-detalle-resumen .encargo-accion-contador {
    display: inline-flex;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 .25rem;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    background: #fff;
    color: #dc3545;
    font-size: .65rem;
    font-weight: 700;
}

.encargo-detalle-resumen .encargo-gremio-control {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: .3rem;
}

.encargo-detalle-resumen .encargo-gremio-control label {
    margin: 0;
    color: #fff;
    font-size: .7rem;
    line-height: 1;
}

.encargo-detalle-resumen .encargo-gremio-control .select-gremio {
    width: auto;
    max-width: 10rem;
    min-height: 1.75rem;
    margin: 0;
    padding: .15rem 1.35rem .15rem .4rem;
    font-size: .72rem;
    line-height: 1;
}

.encargo-detalle-resumen .encargo-body {
    padding: .65rem .75rem .8rem;
}

.encargo-detalle-resumen .section-title {
    margin-top: .75rem;
    margin-bottom: .1rem;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.25;
}

.encargo-detalle-resumen .section-title:first-child {
    margin-top: 0;
}

.encargo-detalle-resumen .line-separator {
    margin-bottom: .35rem;
    border-top-width: 1px;
}

.encargo-detalle-resumen .info-line {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: clamp(.75rem, 2vw, 2rem);
    row-gap: .2rem;
    margin: 0;
}

.encargo-detalle-resumen .info-col,
.encargo-detalle-resumen .info-col-large {
    min-width: 0;
    max-width: none !important;
    padding: .2rem .25rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.encargo-detalle-resumen .info-col-span-2 {
    grid-column: span 2;
}

.encargo-detalle-resumen .info-col-full {
    grid-column: 1 / -1;
}

.encargo-detalle-resumen .info-label {
    margin-right: .3rem;
}

@media (max-width: 991.98px) {
    .encargo-detalle-resumen .info-line {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .encargo-detalle-resumen .info-col-span-2,
    .encargo-detalle-resumen .info-col-full {
        grid-column: 1 / -1;
    }
}

@media (max-width: 575.98px) {
    .encargo-detalle-resumen .encargo-detalle-toolbar {
        padding: .25rem;
    }

    .encargo-detalle-resumen .encargo-detalle-acciones {
        justify-content: flex-start;
        gap: .25rem;
    }

    .encargo-detalle-resumen .encargo-accion {
        width: 1.85rem;
        min-width: 1.85rem;
        min-height: 1.85rem;
        padding: 0;
    }

    .encargo-detalle-resumen .encargo-accion-texto {
        display: none;
    }

    .encargo-detalle-resumen .encargo-accion-contador {
        position: absolute;
        margin: -1.35rem 0 0 1.25rem;
        border: 1px solid #dc3545;
    }

    .encargo-detalle-resumen .encargo-gremio-control {
        flex: 1 1 8rem;
        justify-content: flex-end;
    }

    .encargo-detalle-resumen .encargo-gremio-control label {
        display: none;
    }

    .encargo-detalle-resumen .encargo-gremio-control .select-gremio {
        width: 100%;
        max-width: 9rem;
        min-height: 1.85rem;
    }

    .encargo-detalle-resumen .encargo-body {
        padding: .55rem .65rem .7rem;
    }

    .encargo-detalle-resumen .section-title {
        margin-top: .65rem;
        font-size: .95rem;
    }

    .encargo-detalle-resumen .info-line {
        grid-template-columns: minmax(0, 1fr);
        row-gap: .1rem;
    }

    .encargo-detalle-resumen .info-col,
    .encargo-detalle-resumen .info-col-large,
    .encargo-detalle-resumen .info-col-span-2,
    .encargo-detalle-resumen .info-col-full {
        grid-column: 1;
        padding: .18rem 0;
    }
}

/*NOTAS*/
.card-notas {
    border: 1px solid #ccc;
}

.header-notas {
    border-start-end-radius: 5px;
    border-start-start-radius: 5px;
    background-color: #dc3545;
    color: #fff;
}

.body-notas {
    padding: 15px;
}

.thead-notas {
    background-color: #27436e;
    color: white;
    font-weight: bold;
}

.table-separada td,
.table-separada th {
    border-right: 2px solid black;
}

    .table-separada td:last-child,
    .table-separada th:last-child {
        border-right: none;
    }

.col-fecha,
.col-acciones,
.col-usuario {
    white-space: nowrap;
}

.col-fecha {
    width: 13%;
}

.col-usuario {
    width: 5%;
}

.col-acciones {
    width: 5% !important;
}

.col-acciones.trabajos-actions-cell,
.trabajos-actions-cell {
    width: 1% !important;
    white-space: nowrap;
}

.trabajos-acciones {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: .35rem;
    white-space: nowrap;
}

.trabajos-acciones .icon {
    flex: 0 0 auto;
}

.tabla-notas {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
    background-color: white;
}

.modal-notas {
    border-radius: 10px;
}

.header-modal-notas {
    background-color: #dc3545;
    color: #fff;
}

.body-modal-notas {
    padding: 20px;
}

.footer-modal-notas {
    display: flex;
    justify-content: flex-end;
}

/*CALENDARIO*/
.calendario-header {
    border-start-end-radius: 5px;
    border-start-start-radius: 5px;
    padding-bottom: 10px;
    padding-top: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}
.month-tile-selected {
    border: 2px solid #27436e;
    background: #27436e;
    color: transparent;
    padding: 10px 15px;
    border-radius: 2px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease-in-out;
    text-align: center;
    margin: 0px;
}
.month-tile {
    border: 2px solid #27436e;
    background: transparent;
    color: #27436e;
    padding: 10px 15px;
    border-radius: 2px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease-in-out;
    text-align: center;
    margin: 0px;
}

    .month-tile:hover,
    .month-tile.active,
    .month-tile:focus,
    .month-tile:active:focus {
        background-color: #27436e !important;
        color: white;
        box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #27436e !important;
    }

.calendar-day-title {
    border: 2px solid #27436e;
    background: transparent;
    color: #27436e;
    padding: 5px 5px !important;
    border-radius: 2px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease-in-out;
    margin: 0px;
    max-width: 10px !important;
}

.calendar-day {
    border: 2px solid #27436e;
    background: transparent;
    padding: 5px 5px !important;
    color: #27436e;
    border-radius: 2px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease-in-out;
    height: 4rem !important;
    max-width: 10px !important;
}

.other-month {
    padding: 0px !important;
    height: 0px !important;
    background-color: dimgray !important;
}

.sabado {
    background-color: aliceblue;
}

.festivo {
    background-color: indianred;
}

.vacacion-usuario {
    background-color: #bfe3ff !important;
}

.actualMonth {
    background-color: lightgreen !important;
}

.actualDay {
    background-color: lightgreen !important;
}

#canvasFirma {
    border: 2px solid #333;
    width: 100%;
    height: 300px;
    touch-action: none;
}

.doc-thumb img {
    transition: .15s;
}

input[name="SelectedExistingDocumentIds"]:checked + .doc-thumb img,
.doc-thumb.selected img {
    border: 2px solid #dc3545;
    box-shadow: 0 0 0 2px #fff inset;
}

.cursor-pointer {
    cursor: pointer;
}

.border-dashed {
    border-style: dashed !important;
}

.tabla-semana th, .tabla-semana td {
    vertical-align: top;
}

.job-card {
    border: 1px solid #e3e6ea;
    border-radius: .5rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.trunc-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.texto-sin-trabajos {
    opacity: .7;
}
/* Badges Bootstrap 4 fallback si no las tienes todas */
.badge-info {
    background-color: #17a2b8;
    color: #fff;
}

.badge-secondary {
    background-color: #6c757d;
    color: #fff;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

a.disabled-link {
    pointer-events: none; /* ❌ no se puede clicar */
    cursor: default; /* cursor normal */
    text-decoration: none; /* quita subrayado */
    color: inherit; /* mantiene color del texto */
    opacity: 0.6; /* opcional: efecto visual */
}

select.form-control,
select.form-select {
    color: #000 !important;
    padding: 0;
    padding-inline: 8px !important;
}

select {
    color: #000;
}

    select option[disabled] {
        color: #6c757d;
    }

/* Ajuste tamaño tipo iOS */
.ios-switch .form-check-input {
    width: 48px;
    height: 28px;
    cursor: pointer;
}

    /* Color OFF (gris iOS) */
    .ios-switch .form-check-input:not(:checked) {
        background-color: #e5e5ea;
        border-color: #e5e5ea;
    }

    /* Color ON (verde iOS) */
    .ios-switch .form-check-input:checked {
        background-color: #34c759;
        border-color: #34c759;
    }

/* Suavizar animación */
.ios-switch .form-check-input {
    transition: background-color 0.25s ease;
}

/*MODALES*/

/* Escala de capas de la aplicacion:
   contenido < overlay < footer < paneles laterales < botones superiores < modales */
:root {
    --z-layout-content: 0;
    --z-layout-rail: 2025;
    --z-layout-overlay: 2028;
    --z-layout-footer: 2030;
    --z-layout-panel: 2035;
    --z-layout-actions: 2140;
    --z-layout-action-active: 2145;
    --z-layout-action-menu: 2150;
    --z-header: 2100;
    --z-pwa-menu: 2300;
    --z-modal-backdrop: 2400;
    --z-modal: 2450;
    --z-modal-control-menu: 2470;
    --z-alert: 2600;
}

.modal-backdrop {
    z-index: var(--regal-backdrop-z, var(--z-modal-backdrop)) !important;
}

.modal {
    z-index: var(--regal-modal-z, var(--z-modal)) !important;
}

.modal-dialog,
.modal-content {
    position: relative;
}

.modal-content {
    z-index: 1;
}

/* Evita que el dropdown de bootstrap-select se corte y mejora stacking */
.bootstrap-select .dropdown-menu {
    max-width: calc(100vw - 2rem) !important;
    font-size: 14px !important;
    padding-left: 0px;
    margin-left: 0px;
}
.bootstrap-select a {
    padding-left: 5px;
    margin-left: 0px;
}

    .bootstrap-select .dropdown-menu,
    .bootstrap-select .dropdown-menu .inner {
        box-sizing: border-box;
    }

        /* Si hay textos largos, que corten con puntos */
        .bootstrap-select .dropdown-menu li a,
        .bootstrap-select .dropdown-menu li span.text {
            display: block;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

/* En página normal queda bajo la modal; dentro de modal sube por encima del contenido. */
.bootstrap-select .dropdown-menu {
    z-index: 1060 !important;
}

.modal .bootstrap-select .dropdown-menu,
.modal .bootstrap-select.open .dropdown-menu,
.modal .bootstrap-select.show .dropdown-menu {
    z-index: var(--z-modal-control-menu) !important;
}

.modal .dropdown-menu,
.modal .dropdown-menu.show,
.bs-container,
.bs-container .dropdown-menu,
.bs-container .dropdown-menu.show {
    z-index: var(--z-modal-control-menu) !important;
}

.modal .bootstrap-select .dropdown-menu,
.bs-container .dropdown-menu {
    width: max-content !important;
    min-width: 100% !important;
    max-width: calc(100vw - 2rem) !important;
}

.modal .bootstrap-select .dropdown-menu .inner,
.bs-container .dropdown-menu .inner {
    width: max-content !important;
    min-width: 100% !important;
    max-width: calc(100vw - 2rem) !important;
}

.modal .bootstrap-select {
    position: relative;
    z-index: auto !important;
}

.modal .bootstrap-select.show,
.modal .bootstrap-select.open {
    z-index: var(--z-modal-control-menu) !important;
}

.select2-container--open,
.select2-dropdown,
.select2-container.select2-container--open {
    z-index: var(--z-modal-control-menu) !important;
}

.ui-datepicker,
.flatpickr-calendar,
.datepicker,
.daterangepicker,
.pac-container {
    z-index: var(--z-modal-control-menu) !important;
}

/* Evita el zoom automático de iOS al enfocar buscadores. */
input[type="search"],
input[type="search"].form-control,
input[type="search"].form-control-sm,
.bootstrap-select .bs-searchbox input,
.bootstrap-select .bs-searchbox .form-control,
.select2-container .select2-search__field {
    font-size: 16px !important;
    -webkit-text-size-adjust: 100%;
}

/* Evitar zoom automático en controles de modales */
.modal input,
.modal select,
.modal textarea,
.bootstrap-select .bs-searchbox input {
    font-size: 16px !important;
}

/* Quitar foco azul feo */
.bootstrap-select .dropdown-toggle:focus {
    outline: none !important;
    box-shadow: none !important;
}

/*FACTURACION*/
.container-fluid {
    overflow-x: hidden;
    overflow-y: visible;
}

.navbar .dropdown-item i {
    width: 1.15rem;
    text-align: center;
}

.descipcion-auto {
    resize: none; /* no permitir arrastrar */
    overflow: hidden; /* sin scroll interno */
    min-height: 32px; /* altura base */
    line-height: 1.2;
    padding-top: 4px;
    padding-bottom: 4px;
}

.presu-editor {
    height: calc(100vh - 142px); /* ajusta según tu navbar */
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Panel de datos de facturas y presupuestos: alto util y solo scroll vertical. */
.document-editor.presu-editor {
    box-sizing: border-box;
    height: 100%;
    max-height: 100%;
    min-width: 0;
    min-height: 0;
    padding-bottom: .25rem;
    overflow: hidden;
}

/* Los editores viven dentro del alto util entre los accesos superiores y el footer. */
body.document-editor-page {
    box-sizing: border-box;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    padding-bottom: 0;
    overflow: hidden;
}

.document-editor-page .layout-main {
    flex: 0 0 auto;
    height: calc(100vh - 1.9rem);
    height: calc(100dvh - 1.9rem);
    min-height: 0;
    padding-bottom: .5rem !important;
    overflow: hidden !important;
}

.document-editor-page .layout-main > .document-editor {
    height: 100%;
    max-height: 100%;
}

.document-editor .presu-header,
.document-editor .presu-body,
.document-editor .presu-datos,
.document-editor .datos-scroll {
    min-width: 0;
    min-height: 0;
    max-width: 100%;
}

.document-editor .presu-header > .d-flex {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.document-editor .presu-body {
    grid-template-columns: clamp(20rem, 21vw, 24rem) minmax(0, 1fr);
    gap: 1rem;
}

.document-editor .presu-datos {
    height: 100%;
    overflow: hidden;
}

.document-editor .datos-scroll {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.document-editor .datos-scroll .card-body {
    box-sizing: border-box;
    width: 100%;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
}

.document-editor .datos-scroll .row {
    width: 100%;
    max-width: 100%;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

.document-editor .datos-scroll .row > [class*="col-"] {
    min-width: 0;
}

.document-editor .datos-scroll input,
.document-editor .datos-scroll select,
.document-editor .datos-scroll textarea,
.document-editor .datos-scroll .bootstrap-select,
.document-editor .datos-scroll .select2-container {
    box-sizing: border-box;
    min-width: 0 !important;
    max-width: 100% !important;
}

.presu-header {
    flex: 0 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.presu-body {
    flex: 1 1 auto;
    overflow: hidden;
    display: grid;
    grid-template-columns: 400px 1fr; /* MÁS ESPACIO PARA LÍNEAS */
    gap: 20px;
}

.presu-datos {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.presu-lineas {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.lineas-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.datos-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.linea-eliminada {
    opacity: .5;
    text-decoration: line-through;
}

.lineas-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    min-height: 3.15rem;
    gap: .75rem;
    padding: .45rem .65rem;
    border: 1px solid #dee2e6;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: #f8fafc;
}

.lineas-toolbar-info {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    min-width: 0;
    color: #27436e;
}

.lineas-toolbar-info span {
    font-weight: 700;
}

.lineas-toolbar-info small {
    color: #6c757d;
    white-space: nowrap;
}

.lineas-toolbar-actions {
    display: flex;
    align-items: center;
    gap: .35rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .lineas-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .lineas-toolbar-info {
        align-items: flex-start;
        flex-direction: column;
        gap: .1rem;
    }

    .lineas-toolbar-info small {
        white-space: normal;
    }
}

.linea-orden {
    width: 1%;
    min-width: 3.1rem;
    max-width: 3.4rem;
    white-space: nowrap;
    text-align: center;
    padding-left: .25rem !important;
    padding-right: .25rem !important;
}

.linea-orden-th {
    width: 1%;
    min-width: 3.1rem;
    max-width: 3.4rem;
    white-space: nowrap;
    text-align: center;
}

.linea-acciones,
.linea-acciones-th {
    width: 1%;
    min-width: 2.7rem;
    max-width: 3.2rem;
    white-space: nowrap;
    text-align: center;
    padding-left: .25rem !important;
    padding-right: .25rem !important;
}

.linea-drag-handle {
    border: 0;
    background: transparent;
    color: #27436e;
    cursor: grab;
    line-height: 1;
    padding: .15rem .25rem;
    touch-action: none;
    user-select: none;
}

.linea-drag-handle:active,
.linea-arrastrando .linea-drag-handle {
    cursor: grabbing;
}

.linea-orden-numero {
    display: inline-block;
    min-width: 1.1rem;
    text-align: right;
}

.linea-arrastrando {
    opacity: .65;
    outline: 2px dashed #27436e;
    outline-offset: -2px;
}

.linea-seleccionada {
    background: #eef5ff !important;
    box-shadow: inset .2rem 0 0 #27436e;
}

.linea-seleccionada .linea-drag-handle {
    color: #0f2f5f;
}

.linea-arrastre-activo {
    cursor: grabbing;
}

/* -----------------------------
   INPUTS
   ----------------------------- */
.presu-totales {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px 12px;
    background: #fff;
}

.totales-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 10px;
    align-items: stretch;
}

.t-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    background: #f8f9fa;
}

.t-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    margin-bottom: 6px;
}

    .t-row:last-child {
        margin-bottom: 0;
    }

.t-label {
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.t-value {
    font-size: 16px;
    font-weight: 700;
}
.t-total {
    background: #eaf2ff;
    border-color: #cfe2ff;
}

.presu-list-precio-sin-iva {
    font-size: 1.05rem;
    font-weight: 700;
}

.presu-list-total {
    margin-top: .15rem;
    font-size: .9rem;
    font-weight: 600;
}

.cliente-list-notas {
    font-size: .95rem;
}

.select-iva {
    border: 0px;
    color: #27436e;
    padding: 0px 0px;
    border-radius: 0px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none !important;
    
}

/* =========================
   TABLA: look "texto" para TODOS los inputs
   (sin tocar la vista)
   ========================= */

/* Mantén table-layout auto para que el ancho sea natural */
.presu-lineas table {
    table-layout: auto;
    width: 100%;
}

input.form-control, textarea.form-control{
    padding-inline: 5px !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}
/* Evita que los números hagan saltos raros */
.presu-lineas th,
.presu-lineas td {
    white-space: nowrap;
    vertical-align: middle;
}

    /* Concepto sí puede ocupar ancho y envolver */
    .presu-lineas td.col-concepto,
    .presu-lineas th:nth-child(2) {
        white-space: normal;
        width: 100%;
    }

    /* ✅ Base: TODOS los inputs dentro de la tabla se ven "transparentes" */
    .presu-lineas .linea-input,
    .presu-lineas td input.form-control,
    .presu-lineas td input.form-control-sm {
        background: transparent;
        border: none !important;
        box-shadow: none !important;
        outline: none !important;
        /* compactos */
        padding: 2px 4px !important;
        height: auto !important;
        line-height: 1.2 !important;
        /* números alineados */
        text-align: right !important;
        font-variant-numeric: tabular-nums;
        /* ancho según contenido */
        display: inline-block !important;
        max-width: none !important;
        min-width: 4ch; /* base */
    }

    .presu-lineas td.col-bruto, .presu-lineas th.col-bruto {
        background: rgba(20, 80, 160, 0.05) !important; 
    }

    .presu-lineas td.col-ivaeur, .presu-lineas th.col-ivaeur {
        background: rgba(20, 160, 120, 0.06) !important;
    }

    .presu-lineas td.col-desceur, .presu-lineas th.col-desceur {
        background: rgba(200, 140, 20, 0.06) !important;
    }

    .presu-lineas td.col-total, .presu-lineas th.col-total {
        background: rgba(20, 80, 160, 0.10) !important;
    }


    /* En inputs editables, dejamos un “subrayado” sutil al enfocar
   (si no quieres NADA, borra este bloque) */
    .presu-lineas td input:not([readonly]).form-control:focus,
    .presu-lineas td input:not([readonly]).form-control-sm:focus,
    .presu-lineas td input:not([readonly]).linea-input:focus {
        border-bottom: 1px solid rgba(0,0,0,.25) !important;
    }

    /* Readonly: un poco más fuerte y sin cursor de texto */
    .presu-lineas td input[readonly] {
        font-weight: 650;
        cursor: default;
    }

    /* Total: destacado */
    .presu-lineas td.col-total input[readonly] {
        font-weight: 800;
    }

    /* Textarea concepto (lo dejamos como está, pero transparente si quieres) */
    .presu-lineas td.col-concepto textarea.form-control,
    .presu-lineas td.col-concepto textarea.form-control-sm {
        background: transparent;
        box-shadow: none !important;
        outline: none !important;
    }

    /* ✅ Quitar cualquier fondo/tonalidad de columnas que pudieses tener */
    .presu-lineas td.col-bruto, .presu-lineas th.col-bruto,
    .presu-lineas td.col-ivaeur, .presu-lineas th.col-ivaeur,
    .presu-lineas td.col-desceur, .presu-lineas th.col-desceur,
    .presu-lineas td.col-total, .presu-lineas th.col-total {
        border-left: none !important;
    }

linea-input{
    color: black !important;
}

.selectpicker{
    padding: 0px !important;
    margin: 0px !important;
}

.col-ivap {
    width: 1%;
    white-space: nowrap;
    padding-left: 2px !important;
    padding-right: 2px !important;
}

    .col-ivap select {
        width: auto !important;
        min-width: 58px;
        padding-left: 4px;
        padding-right: 18px;
    }

.iva-compacto {
    width: 58px !important;
    min-width: 58px !important;
    max-width: 58px !important;
}

.siniestro-copy-box {
    transition: color 0.25s ease;
}

    .siniestro-copy-box.copy-highlight {
        color: #198754; /* verde bootstrap elegante */
        font-weight: 600;
    }


.fila-caixabank {
    background-color: #effdfa !important;
}

.fila-abanca {
    background-color: #f5f1ff !important;
}

.fila-santander {
    background-color: #fff4f4 !important;
}

    .fila-caixabank:hover,
    .fila-abanca:hover,
    .fila-santander:hover {
        filter: brightness(0.98);
    }

/* MOVIMIENTOS BANCARIOS */
.movimientos-empty {
    border-radius: 8px;
}

.movimientos-panel {
    --mov-bg: #ffffff;
    --mov-soft: #f6f8fb;
    --mov-soft-2: #eef3f8;
    --mov-border: #dbe3ee;
    --mov-border-soft: rgba(39, 67, 110, .12);
    --mov-text: #1f2937;
    --mov-muted: #667085;
    --mov-brand: #27436e;
    --mov-shadow: 0 14px 36px rgba(16, 24, 40, .10);
    background: var(--mov-bg);
    border: 1px solid var(--mov-brand);
    border-radius: 8px;
    box-shadow: var(--mov-shadow);
    overflow: visible;
}

.movimientos-toolbar {
    position: relative;
    z-index: 20;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #27436e;
    border-bottom: 1px solid #27436e;
}

.movimientos-toolbar-title {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
}

    .movimientos-toolbar-title h2 {
        margin: 0;
        color: #fff;
        font-size: 16px;
        font-weight: 650;
        line-height: 1.2;
    }

    .movimientos-toolbar-title span {
        color: rgba(255, 255, 255, .82);
        font-size: 12px;
        font-weight: 500;
        white-space: nowrap;
    }

.movimientos-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.movimientos-btn,
.movimientos-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
    border-radius: 6px;
    font-weight: 600;
    line-height: 1.1;
}

.movimientos-btn {
    color: var(--mov-brand);
    background: #fff;
    border: 1px solid var(--mov-border);
}

    .movimientos-btn:hover,
    .movimientos-btn:focus {
        color: var(--mov-brand);
        background: var(--mov-soft-2);
        border-color: #b9c6d8;
    }

.movimientos-btn-primary {
    color: #fff;
    background: var(--mov-brand);
    border: 1px solid var(--mov-brand);
}

    .movimientos-btn-primary:hover,
    .movimientos-btn-primary:focus {
        color: #fff;
        background: #27436e;
        border-color: #27436e;
    }

.movimientos-btn-blue {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 30px;
    border-radius: 6px;
    color: #fff !important;
    background: #27436e;
    border: 1px solid #27436e;
    font-weight: 700;
    line-height: 1.1;
}

    .movimientos-btn-blue:hover,
    .movimientos-btn-blue:focus {
        color: #fff !important;
        background: #27436e;
        border-color: #27436e;
    }

.movimientos-column-menu {
    min-width: 200px;
    padding: 6px;
    border: 1px solid var(--mov-border);
    border-radius: 8px;
    box-shadow: 0 16px 34px rgba(16, 24, 40, .16);
    z-index: 2050;
}

    .movimientos-column-menu .dropdown-item {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0;
        padding: 8px 10px;
        border-radius: 6px;
        color: var(--mov-text);
        cursor: pointer;
        user-select: none;
    }

    .movimientos-column-menu .dropdown-item:hover {
        background: var(--mov-soft-2);
    }

.movimientos-table-shell {
    background: #fff;
}

.movimientos-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-color: #aebbd0 #eef3f8;
    scrollbar-width: thin;
}

.movimientos-table-wrap:focus {
    outline: 2px solid rgba(39, 67, 110, .35);
    outline-offset: -2px;
}

.movimientos-table {
    width: 100%;
    min-width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    color: #000;
}

    .movimientos-table thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        padding: 12px 10px;
        background: #27436e;
        color: #fff;
        border-bottom: 1px solid #27436e;
        font-size: 11px;
        font-weight: 650;
        text-transform: uppercase;
        letter-spacing: 0;
        vertical-align: middle;
        white-space: nowrap;
    }

    .movimientos-table tbody td {
        padding: 9px 10px;
        vertical-align: middle;
        border-top: 1px solid rgba(39, 67, 110, .18);
        color: #000;
        font-size: 13px;
        line-height: 1.25;
    }

    .movimientos-table tbody td small,
    .movimientos-table tbody td .text-muted {
        color: #000 !important;
    }

    .movimientos-table .text-success {
        color: #008a3d !important;
    }

    .movimientos-table .text-danger {
        color: #d00000 !important;
    }

    .movimientos-table .text-dark {
        color: #000 !important;
    }

    .movimientos-table tbody td *,
    .movimientos-table tbody td a,
    .movimientos-table tbody td button:not(.badge):not(.movimientos-btn):not(.movimientos-btn-primary) {
        color: #000 !important;
    }

    .movimientos-table .badge,
    .movimientos-table .btn,
    .movimientos-table button,
    .movimientos-table a {
        color: #000 !important;
    }

    .movimientos-table .movimientos-btn-blue {
        color: #fff !important;
        background: #27436e;
        border-color: #27436e;
    }

    .movimientos-table .movimientos-btn-blue:hover,
    .movimientos-table .movimientos-btn-blue:focus {
        color: #fff !important;
        background: #27436e;
        border-color: #27436e;
    }

    .movimientos-table .badge-success,
    .movimientos-table .badge-danger,
    .movimientos-table .badge-primary,
    .movimientos-table .badge-secondary,
    .movimientos-table .badge-warning,
    .movimientos-table .badge-info {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        min-height: 26px;
        padding: 5px 8px;
        border-radius: 5px;
        color: #000 !important;
        font-size: 12px;
        font-weight: 500;
        line-height: 1;
    }

    .movimientos-table tbody tr {
        background: #fff;
        transition: background-color .15s ease, box-shadow .15s ease;
    }

    .movimientos-table tbody tr:nth-child(even) {
        background: #f3f7fc;
    }

    .movimientos-table tbody tr:hover {
        background: #e9f0f8;
        box-shadow: inset 3px 0 0 var(--mov-brand);
    }

    .movimientos-table .mov-filter-row th {
        top: 2.625rem;
        padding: .35rem;
        background: #eef3f8;
        border-bottom: 1px solid rgba(39, 67, 110, .25);
    }

.mov-column-filter {
    min-height: 1.8rem;
    padding: .25rem .35rem;
    border: 1px solid rgba(39, 67, 110, .35);
    border-radius: .25rem;
    color: #000;
    font-size: .75rem;
}

    .mov-column-filter:focus {
        border-color: #27436e;
        box-shadow: 0 0 0 .12rem rgba(39, 67, 110, .18);
    }

.mov-col-check {
    width: 1rem;
}

.mov-col-fecha {
    width: 5.75rem;
}

.mov-col-cuenta {
    width: clamp(9rem, 11vw, 11rem);
}

.mov-col-concepto {
    width: clamp(12rem, 18vw, 16rem);
}

.mov-col-datos {
    width: clamp(13rem, 20vw, 17rem);
}

.mov-col-tipo {
    width: 3.5rem !important;
}

.mov-col-estado {
    width: 3.5rem !important;
}

.mov-col-importe,
.mov-col-saldo {
    width: 5rem !important;
}

.mov-col-factura {
    width: 10rem !important;
}

.mov-col-acciones {
    width: 8rem !important;
}

.mov-check-cell,
.mov-col-check {
    text-align: center;
}

.mov-check-cell {
    width: 1.625rem;
    min-width: 2.625rem;
    max-width: 2.625rem;
    padding-left: 6px !important;
    padding-right: 6px !important;
}

.mov-text-clip {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mov-text-wrap {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mov-primary-text {
    color: #000;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mov-amount,
.mov-card-amount {
    font-variant-numeric: tabular-nums;
}

.mov-amount,
.mov-money {
    font-weight: 600;
}

.movimientos-table td.mov-amount.text-success,
.movimientos-table td.mov-amount.text-success * {
    color: #008a3d !important;
}

.movimientos-table td.mov-amount.text-danger,
.movimientos-table td.mov-amount.text-danger * {
    color: #d00000 !important;
}

.movimientos-table .mov-money,
.movimientos-table .mov-money *,
.movimientos-table td[data-col="saldo"],
.movimientos-table td[data-col="saldo"] * {
    color: #000 !important;
}

.mov-estado-btn {
    cursor: pointer;
    font: inherit;
}

.movimientos-table td[data-col="tipo"],
.movimientos-table td[data-col="estado"],
.movimientos-table th[data-col="tipo"],
.movimientos-table th[data-col="estado"] {
    text-align: center;
    padding-left: .25rem;
    padding-right: .25rem;
}

.movimientos-table td[data-col="factura"],
.movimientos-table th[data-col="factura"] {
    padding-left: .35rem;
    padding-right: .35rem;
}

.mov-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    justify-content: flex-end;
    width: 100%;
    min-width: 0;
}

.mov-actions-head,
.mov-actions-cell {
    width: 10.75rem;
    min-width: 10.75rem;
    max-width: 10.75rem;
    white-space: nowrap;
    text-align: right;
}

.mov-actions-cell {
    padding-left: 4px !important;
    padding-right: 4px !important;
    overflow: hidden;
}

    .mov-actions .btn {
        flex: 0 0 auto;
        padding: .3rem .45rem;
        min-height: 30px;
        line-height: 1.1;
        white-space: nowrap;
    }

.movimientos-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .65rem .85rem;
    background: #f3f7fc;
    border-top: 1px solid rgba(39, 67, 110, .22);
    color: #000;
}

.mov-page-info {
    font-size: .85rem;
    font-weight: 600;
}

.mov-page-actions {
    display: flex;
    gap: .4rem;
}

.mov-resize-handle {
    position: absolute;
    top: 0;
    right: -3px;
    width: 10px;
    height: 100%;
    cursor: col-resize;
    z-index: 3;
    touch-action: none;
}

    .mov-resize-handle::after {
        content: "";
        position: absolute;
        top: 22%;
        bottom: 22%;
        left: 4px;
        width: 2px;
        border-radius: 999px;
        background: rgba(39, 67, 110, .20);
        transition: background-color .15s ease;
    }

    .mov-resize-handle:hover::after {
        background: var(--mov-brand);
    }

.movimientos-mobile-list {
    display: grid;
    gap: 12px;
    padding: 12px;
    background: #f4f7fb;
}

.movimiento-mobile-card {
    background: #fff;
    border: 1px solid var(--mov-border);
    border-left: 4px solid var(--mov-brand);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .08);
}

.mov-card-caixabank {
    border-left-color: #13a999;
}

.mov-card-abanca {
    border-left-color: #7156d9;
}

.mov-card-santander {
    border-left-color: #d93030;
}

.mov-card-top,
.mov-card-badges,
.mov-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mov-card-top {
    justify-content: space-between;
}

.mov-card-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin: 0;
    color: var(--mov-muted);
    font-weight: 600;
}

.mov-card-amount {
    flex: 0 0 auto;
    font-weight: 650;
    font-size: 17px;
    text-align: right;
}

.mov-card-title {
    margin: 10px 0 0;
    color: var(--mov-text);
    font-size: 15px;
    font-weight: 650;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.mov-card-muted,
.mov-card-extra,
.mov-card-observaciones {
    color: var(--mov-muted);
    font-size: 12px;
    line-height: 1.35;
    margin-top: 4px;
    overflow-wrap: anywhere;
}

.mov-card-extra {
    color: #3f4a5a;
}

.mov-card-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin: 12px 0 0;
    color: #4d5968;
}

    .mov-card-meta div {
        min-width: 0;
    }

    .mov-card-meta dt {
        margin: 0;
        color: var(--mov-muted);
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0;
    }

    .mov-card-meta dd {
        margin: 2px 0 0;
        font-size: 12px;
        font-weight: 500;
        overflow-wrap: anywhere;
    }

.mov-card-badges {
    flex-wrap: wrap;
    margin-top: 12px;
}

    .mov-card-badges .badge,
    .mov-card-badges .mov-estado-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 5.25rem;
        min-height: 2.125rem;
        padding: .45rem .65rem;
        border-radius: .35rem;
        color: #000 !important;
        font-size: .75rem;
        font-weight: 500;
        line-height: 1;
    }

.mov-card-factura {
    margin-top: 12px;
    padding: 10px;
    border: 1px solid var(--mov-border-soft);
    border-radius: 8px;
    background: #fbfcfe;
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: var(--mov-muted);
    font-size: 12px;
}

    .mov-card-factura strong {
        color: var(--mov-text);
        font-size: 13px;
    }

.mov-card-actions {
    flex-wrap: wrap;
    margin-top: 12px;
}

    .mov-card-actions .btn {
        flex: 1 1 128px;
        padding: 8px 10px;
    }

@media (min-width: 768px) and (max-width: 1199.98px) {
    .movimientos-toolbar {
        padding: 10px 12px;
    }

    .movimientos-table tbody td {
        padding: 8px 8px;
    }
}

@media (max-width: 575.98px) {
    .movimientos-toolbar {
        align-items: flex-start;
        padding: 12px;
    }

    .movimientos-toolbar-title {
        flex-direction: column;
        gap: 2px;
    }

    .movimientos-toolbar-title h2 {
        font-size: 15px;
    }

    .mov-card-meta {
        grid-template-columns: 1fr;
    }

    .mov-card-actions .btn {
        flex-basis: 100%;
    }
}

@media (prefers-color-scheme: dark) {
    .movimientos-panel {
        --mov-bg: #111827;
        --mov-soft: #172033;
        --mov-soft-2: #202b42;
        --mov-border: #2c3850;
        --mov-border-soft: rgba(226, 232, 240, .12);
        --mov-text: #e5e7eb;
        --mov-muted: #a7b0bf;
        --mov-brand: #8bb6ff;
        --mov-shadow: 0 14px 34px rgba(0, 0, 0, .28);
    }

    .movimientos-toolbar,
    .movimientos-table-shell,
    .movimientos-column-menu,
    .movimientos-btn,
    .movimiento-mobile-card {
        background: #27436e;
    }

    .movimientos-mobile-list,
    .movimientos-table thead th,
    .mov-card-factura,
    .movimientos-table tbody tr:nth-child(even) {
        background: #27436e;
    }

    .movimientos-table tbody tr,
    .movimientos-table tbody tr:hover {
        background: #27436e;
    }

    .movimientos-table tbody td,
    .movimientos-table .text-dark {
        color: var(--mov-text) !important;
    }

    .movimientos-table tbody td small,
    .movimientos-table tbody td .text-muted {
        color: var(--mov-muted) !important;
    }

    .movimientos-table .text-success {
        color: #7dd3a8 !important;
    }

    .movimientos-table .text-danger {
        color: #fca5a5 !important;
    }

    .movimientos-btn {
        color: var(--mov-text);
    }

    .movimientos-column-menu .dropdown-item,
    .mov-card-title {
        color: var(--mov-text);
    }

    .movimientos-column-menu .dropdown-item:hover {
        background: var(--mov-soft-2);
    }
}

.switch-bootstrap {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

    .switch-bootstrap input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider-bootstrap {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ced4da;
    transition: .25s;
}

    .slider-bootstrap:before {
        position: absolute;
        content: "";
        height: 20px;
        width: 20px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: .25s;
    }

.switch-bootstrap input:checked + .slider-bootstrap {
    background-color: #28a745;
}

    .switch-bootstrap input:checked + .slider-bootstrap:before {
        transform: translateX(24px);
    }

.slider-bootstrap.round {
    border-radius: 34px;
}

    .slider-bootstrap.round:before {
        border-radius: 50%;
    }

.modal-exportaciones-custom {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    background: rgba(0,0,0,.45);
    overflow: auto;
    padding: 40px 15px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}

    .modal-exportaciones-custom.show-modal {
        opacity: 1;
        visibility: visible;
    }

    .modal-exportaciones-custom .modal-dialog {
        margin: 0 auto;
        transform: translateY(-20px) scale(.97);
        transition: transform .25s ease;
    }

    .modal-exportaciones-custom.show-modal .modal-dialog {
        transform: translateY(0) scale(1);
    }

body.modal-exportaciones-open {
    overflow: hidden;
}

/* Configuracion de plataforma */
.config-layout {
    display: grid;
    grid-template-columns: minmax(13rem, 16rem) minmax(0, 1fr);
    align-items: start;
    gap: 1rem;
}

.config-menu {
    overflow: hidden;
    border: 1px solid #d8dde6;
    border-radius: 6px;
}

.config-menu a,
.config-menu-placeholder {
    display: flex;
    align-items: center;
    gap: .55rem;
    min-height: 3rem;
    padding: .8rem 1rem;
    border-bottom: 1px solid #e7ebf1;
    color: #27436e;
    font-weight: 700;
    text-decoration: none;
}

.config-menu-heading {
    display: block;
    padding: .75rem 1rem .35rem;
    border-bottom: 1px solid #edf0f5;
    color: #6b7788;
    background: #f7f9fc;
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.config-menu a:last-child,
.config-menu-placeholder:last-child {
    border-bottom: 0;
}

.config-menu a:hover,
.config-menu a:focus {
    background: #edf3fa;
    color: #1e3558;
    text-decoration: none;
}

.config-menu a.active {
    color: #fff;
    background: #27436e;
}

.config-menu-placeholder {
    color: #8a96a6;
    font-size: .8rem;
    cursor: default;
}

.config-dropdown-header {
    color: #6b7788;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.config-section-title {
    margin: 0;
    color: #27436e;
    font-size: 1.1rem;
    font-weight: 700;
}

.profile-summary {
    display: flex;
    align-items: center;
    min-height: 8.5rem;
    padding: 1.35rem;
    border: 1px solid rgba(39, 67, 110, .14);
    border-radius: 6px;
    color: #fff;
    background: #27436e;
}

.profile-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 4.5rem;
    width: 4.5rem;
    height: 4.5rem;
    margin-right: 1rem;
    border: 2px solid rgba(255, 255, 255, .65);
    border-radius: 50%;
    color: #27436e;
    background: #fff;
    font-size: 1.35rem;
    font-weight: 700;
}

.profile-summary-copy {
    min-width: 0;
}

.profile-eyebrow {
    display: block;
    margin-bottom: .2rem;
    color: #cdd9eb;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.profile-summary h4 {
    margin: 0 0 .55rem;
    color: #fff;
    font-size: 1.45rem;
}

.profile-summary-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem 1rem;
    font-size: .8rem;
}

.profile-status {
    display: inline-flex;
    align-items: center;
    padding: .25rem .55rem;
    border-radius: 1rem;
    font-size: .7rem;
    font-weight: 700;
}

.profile-status.is-active {
    color: #164d2c;
    background: #c9f0d6;
}

.profile-status.is-inactive {
    color: #7b2222;
    background: #f5cece;
}

.profile-account-list > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 0;
    border-bottom: 1px solid #e5e9ef;
}

.profile-account-list dt,
.profile-account-list dd {
    margin: 0;
}

.profile-account-list dt {
    color: #69788c;
    font-size: .75rem;
    font-weight: 600;
}

.profile-account-list dd {
    color: #17243a;
    font-size: .8rem;
    font-weight: 700;
    text-align: right;
}

.profile-account-note {
    margin-top: 1rem;
    padding: .75rem;
    border-left: 3px solid #27436e;
    color: #69788c;
    background: #f4f7fb;
    font-size: .72rem;
}

@media (max-width: 768px) {
    .config-layout {
        grid-template-columns: 1fr;
    }

    .config-menu {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .config-menu-placeholder {
        display: none;
    }

    .config-menu a {
        justify-content: center;
        border-bottom: 0;
        font-size: .75rem;
        text-align: center;
    }

    .profile-summary {
        align-items: flex-start;
    }

    .profile-avatar {
        flex-basis: 3.5rem;
        width: 3.5rem;
        height: 3.5rem;
        font-size: 1rem;
    }

    .profile-summary h4 {
        font-size: 1.15rem;
    }
}

.swal2-container {
    z-index: var(--z-alert) !important;
}

/* PWA notifications */
header,
header .navbar,
header .container-fluid,
header .navbar-collapse,
header .navbar-nav,
.pwa-notifications {
    overflow: visible !important;
}

header {
    position: relative;
    z-index: var(--z-header);
}

.pwa-notifications-menu {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 1.05rem;
    background: #fff;
}

.pwa-notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1rem;
    border-bottom: 1px solid #e4e9f0;
    background: #fff;
}

.pwa-notifications-heading {
    display: flex;
    align-items: center;
    min-width: 0;
    color: #17243a;
}

.pwa-notifications-heading-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    margin-right: .65rem;
    border-radius: 50%;
    color: #fff;
    background: #27436e;
}

.pwa-notifications-heading strong,
.pwa-notifications-heading small {
    display: block;
    line-height: 1.2;
}

.pwa-notifications-heading strong {
    font-size: .95rem;
}

.pwa-notifications-heading small {
    margin-top: .15rem;
    color: #78869a;
    font-size: .7rem;
}

.pwa-notifications-header .badge {
    padding: .35rem .55rem;
    border-radius: 1rem;
    font-size: .68rem;
}

.pwa-notifications-header-actions {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: .45rem;
}

.pwa-notifications-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: #fff;
}

.pwa-notifications-empty {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    min-height: 132px;
    padding: 1.25rem;
    color: #17243a;
    text-align: center;
}

.pwa-notifications-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: .55rem;
    border-radius: 50%;
    color: #27436e;
    background: #edf3fa;
    font-size: 1.15rem;
}

.pwa-notifications-empty strong {
    font-size: .9rem;
}

.pwa-notifications-empty small {
    margin-top: .2rem;
    color: #78869a;
    font-size: .75rem;
}

.pwa-notifications-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 3rem;
    gap: 1px;
    padding: 1px;
    border-top: 1px solid #e4e9f0;
    background: #d5deea;
}

.pwa-notifications-menu .pwa-notifications-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: .5rem;
    border: 0 !important;
    border-radius: 0 !important;
    color: #27436e !important;
    background: #fff !important;
    box-shadow: none !important;
    font-size: .78rem;
    font-weight: 600;
}

.pwa-notifications-menu .pwa-notifications-action i {
    margin-right: .4rem;
}

.pwa-notifications-menu .pwa-notifications-action:hover,
.pwa-notifications-menu .pwa-notifications-action:focus {
    background: #edf3fa !important;
}

.pwa-notifications-menu .pwa-notifications-action-danger {
    color: #9b2c2c !important;
}

.pwa-notifications-menu .pwa-notifications-action-danger:hover,
.pwa-notifications-menu .pwa-notifications-action-danger:focus {
    background: #fff3f3 !important;
}

.pwa-notification-open {
    color: #111 !important;
    text-decoration: none !important;
    line-height: 1.25;
    border: none !important;
}

.pwa-notification-item {
    position: relative;
    border-left: 4px solid transparent;
}

.pwa-notification-unread {
    background: #fff8df;
    border-left-color: #27436e;
}

.pwa-notification-unread .pwa-notification-title {
    font-weight: 700;
}

.pwa-unread-dot {
    display: inline-block;
    width: .5rem;
    height: .5rem;
    margin-right: .35rem;
    border-radius: 50%;
    background: #27436e;
    vertical-align: middle;
}

.pwa-unread-badge {
    color: #1f2937;
    font-size: .65rem;
    vertical-align: middle;
}

.pwa-notification-open:hover,
.pwa-notification-open:focus {
    color: #111 !important;
    text-decoration: none !important;
}

.pwa-notification-delete {
    min-width: 1.75rem;
    color: #8b1f1f !important;
    border: none !important;
}

.control-obra-table-toolbar {
    margin-bottom: 0;
}

.control-card {
    --mov-bg: #ffffff;
    --mov-soft: #f6f8fb;
    --mov-soft-2: #eef3f8;
    --mov-border: #dbe3ee;
    --mov-border-soft: rgba(39, 67, 110, .12);
    --mov-text: #1f2937;
    --mov-muted: #667085;
    --mov-brand: #27436e;
    border: 1px solid #d9e0ea;
    border-radius: .35rem;
    box-shadow: 0 .2rem .75rem rgba(20, 39, 70, .06);
    padding: 1rem;
    background: #fff;
}

.control-value {
    color: #27436e;
    font-size: 1.35rem;
    font-weight: 800;
}

.gastos-page .control-card label {
    color: #27436e;
    font-weight: 600;
}

.control-obra-table-toolbar .movimientos-toolbar-title h2 {
    font-size: 14px;
}

.control-obra-table-wrap {
    background: #fff !important;
}

.control-filter-table.movimientos-table,
.control-filter-table.movimientos-table tbody,
.control-filter-table.movimientos-table tbody tr,
.control-filter-table.movimientos-table tbody tr:hover,
.control-filter-table.movimientos-table tbody tr:nth-child(even) {
    background: #fff !important;
}

.control-filter-table.movimientos-table tbody tr:nth-child(even) {
    background: #f3f7fc !important;
}

.control-filter-table.movimientos-table tbody tr:hover {
    background: #e9f0f8 !important;
}

.control-filter-table.movimientos-table tbody tr td {
    background: inherit !important;
}

.control-filter-table.movimientos-table tbody td,
.control-filter-table.movimientos-table tbody td *,
.control-filter-table.movimientos-table .text-dark,
.control-filter-table.movimientos-table tbody td small,
.control-filter-table.movimientos-table tbody td .text-muted {
    color: #000 !important;
}

.control-obra-table-toolbar,
.control-obra-table-toolbar .movimientos-btn,
.control-obra-table-toolbar .movimientos-column-menu,
.control-obra-table-toolbar .movimientos-column-menu .dropdown-item {
    color: #27436e !important;
}

.control-obra-table-toolbar .movimientos-btn,
.control-obra-table-toolbar .movimientos-column-menu,
.control-obra-table-toolbar .movimientos-column-menu .dropdown-item {
    background: #fff !important;
}

.control-panel {
    background: #fff;
    border: 1px solid #d9e0ea;
    border-radius: .35rem;
    box-shadow: 0 .2rem .75rem rgba(20, 39, 70, .06);
    margin-bottom: 1rem;
    padding: 1rem;
}

.control-panel.metric {
    border-left: .25rem solid #27436e;
    padding-left: .75rem;
}

.metric-value {
    color: #27436e;
    font-size: 1.35rem;
    font-weight: 800;
}

.control-table th {
    background: #27436e;
    color: #fff;
    white-space: nowrap;
}

.control-table td {
    color: #000;
    vertical-align: middle;
}

.control-table-scroll {
    overflow-x: auto;
}

.control-obra-embedded .encargo-header {
    align-items: center;
}

.control-obra-embedded .header-right {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

/* Operario */
.operario-agenda,
.operario-work {
    color: #111;
}

.operario-work {
    max-width: 920px;
}

.agenda-topbar,
.work-topbar {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.agenda-topbar-actions {
    align-items: center;
    display: inline-flex;
    flex-wrap: nowrap;
    gap: .65rem;
    justify-content: flex-end;
}

.agenda-topbar-actions .btn {
    white-space: nowrap;
}

.agenda-topbar h1 {
    font-size: 1.6rem;
    margin: 0;
}

.work-topbar h1 {
    font-size: 1.45rem;
    margin: 0;
}

.agenda-topbar span,
.agenda-week-header span,
.work-topbar span {
    color: #59677c;
    font-size: .9rem;
}

.work-topbar span {
    display: block;
    margin-top: .15rem;
}

.agenda-week,
.work-card {
    background: #fff;
    border: 1px solid #d7dee8;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.agenda-week {
    overflow: hidden;
}

.work-card {
    border-color: #d8e0eb;
    padding: 1rem;
}

.agenda-week-header {
    align-items: center;
    background: #27436e;
    color: #fff;
    display: flex;
    justify-content: space-between;
    padding: .85rem 1rem;
}

.agenda-week-header h2 {
    font-size: 1rem;
    margin: 0;
}

.agenda-week-header span {
    color: #e8eef7;
}

.agenda-days,
.summary-grid {
    display: grid;
    gap: 0;
    grid-template-columns: 1fr;
}

.summary-grid {
    gap: .8rem;
}

.agenda-day {
    background: #fff;
    border-bottom: 1px solid #e3e8ef;
    padding: .8rem;
}

.agenda-day:last-child {
    border-bottom: 0;
}

.agenda-day.is-today {
    background: #f2f7ff;
}

.agenda-day.is-holiday {
    background: #fff3cd;
}

.agenda-day.has-absence {
    background: #e8f5ff;
}

.agenda-day.is-holiday.has-absence {
    background: linear-gradient(135deg, #fff3cd 0%, #fff3cd 50%, #e8f5ff 50%, #e8f5ff 100%);
}

.agenda-day header,
.work-card-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.agenda-day header {
    margin-bottom: .65rem;
}

.work-card-header {
    border-bottom: 1px solid #edf1f6;
    margin-bottom: 1rem;
    padding-bottom: .75rem;
}

.agenda-day header strong,
.agenda-day header small,
.summary-grid small,
.summary-grid strong {
    display: block;
}

.agenda-day header span {
    align-items: center;
    background: #27436e;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: .8rem;
    font-weight: 700;
    height: 1.5rem;
    justify-content: center;
    min-width: 1.5rem;
    padding: 0 .45rem;
}

.agenda-empty {
    color: #7b8795;
    font-size: .9rem;
    padding: .4rem 0;
}

.agenda-day-flag {
    border-radius: 5px;
    font-size: .78rem;
    line-height: 1.2;
    margin-bottom: .55rem;
    padding: .45rem .55rem;
}

.agenda-day-flag strong,
.agenda-day-flag span {
    display: block;
}

.agenda-day-flag-holiday {
    background: #ffe8a1;
    color: #5f4300;
}

.agenda-day-flag-absence {
    background: #cfeeff;
    color: #0b4564;
}

.agenda-item {
    border: 1px solid #d9e1ec;
    border-left: .25rem solid #27436e;
    border-radius: 5px;
    color: #111;
    display: block;
    margin-bottom: .6rem;
    padding: .65rem .7rem;
    text-decoration: none;
}

.agenda-item:hover {
    background: #f8fbff;
    color: #111;
    text-decoration: none;
}

.agenda-item-appointment {
    border-left-color: #007bff;
}

.agenda-item-main {
    align-items: flex-start;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
}

.agenda-item-main strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agenda-item-main span {
    color: #27436e;
    flex: 0 0 auto;
    font-size: .8rem;
    font-weight: 700;
}

.agenda-item p {
    color: #222;
    display: -webkit-box;
    font-size: .9rem;
    line-height: 1.25;
    margin: .35rem 0 .2rem;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.agenda-item small,
.agenda-item em {
    color: #5f6f84;
    display: block;
    font-size: .78rem;
    font-style: normal;
}

.summary-grid small {
    color: #65758d;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.summary-grid strong {
    color: #111;
    font-size: .98rem;
    margin-top: .1rem;
}

.manager-description {
    border-top: 1px solid #edf1f6;
    margin: .9rem 0 0;
    padding-top: .9rem;
    white-space: pre-line;
}

.work-card-header h2 {
    font-size: 1.05rem;
    margin: 0;
}

#autosaveStatus {
    color: #65758d;
    display: block;
    font-size: .82rem;
    margin-top: .15rem;
}

#autosaveStatus.is-saving {
    color: #856404;
}

#autosaveStatus.is-ok {
    color: #1f7a3a;
}

#autosaveStatus.is-error {
    color: #a51f2d;
}

.work-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: 1rem;
}

.empty-work {
    display: grid;
    gap: .5rem;
}

.empty-work span {
    color: #59677c;
}

@media (max-width: 575.98px) {
    .agenda-topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .agenda-topbar-actions {
        width: 100%;
    }

    .agenda-topbar-actions .btn {
        flex: 1 1 0;
        padding-left: .65rem;
        padding-right: .65rem;
        text-align: center;
    }
}

@media (min-width: 768px) {
    .agenda-days {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .agenda-day {
        border-bottom: 0;
        border-right: 1px solid #e3e8ef;
        min-height: 13rem;
    }

    .agenda-day:last-child {
        border-right: 0;
    }

    .summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.processor-console-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.processor-console-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-end;
}

.processor-console-meta {
    align-items: center;
    background: #f4f7fb;
    border: 1px solid #dbe4f0;
    border-radius: 6px;
    color: #27436e;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem 1.5rem;
    justify-content: space-between;
    margin-bottom: .8rem;
    padding: .65rem .8rem;
}

.processor-console-meta span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.processor-console {
    background: #07111f;
    border: 1px solid #172a45;
    border-radius: 8px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 18px 40px rgba(7,17,31,.18);
    color: #d9e7ff;
    font-family: Consolas, "Courier New", monospace;
    font-size: .84rem;
    line-height: 1.5;
    overflow: hidden;
    padding: 0;
}

.processor-console-topline {
    align-items: center;
    background: #0e1a2c;
    border-bottom: 1px solid #1d3150;
    color: #93c5fd;
    display: flex;
    font-size: .78rem;
    font-weight: 700;
    gap: .8rem;
    justify-content: space-between;
    padding: .55rem .8rem;
    width: 100%;
}

.processor-console-scroll {
    max-height: 32rem;
    min-height: 22rem;
    overflow: auto;
}

.processor-console-output {
    display: block;
    min-width: 58rem;
    padding: .55rem 0;
    white-space: pre;
}

.processor-log-row {
    align-items: baseline;
    border-left: 3px solid transparent;
    display: grid;
    gap: .85rem;
    grid-template-columns: 1rem 5.8rem 5.2rem minmax(0, 1fr);
    min-height: 1.55rem;
    padding: .1rem .8rem;
}

.processor-log-row:hover {
    background: rgba(148, 163, 184, .08);
}

.processor-log-prompt {
    color: #64748b;
    user-select: none;
}

.processor-log-time {
    color: #b7c7dc;
    font-weight: 700;
}

.processor-log-level {
    border-right: 1px solid rgba(148, 163, 184, .22);
    font-weight: 800;
    letter-spacing: .04em;
    padding-right: .8rem;
    text-align: left;
}

.processor-log-message {
    color: #e5edf8;
    overflow: visible;
}

.processor-log-line,
.processor-log-info,
.processor-log-warn,
.processor-log-error,
.processor-log-muted {
    display: block;
}

.processor-log-info {
    border-left-color: #38bdf8;
}

.processor-log-info .processor-log-level {
    color: #67e8f9;
}

.processor-log-warn {
    background: rgba(180, 83, 9, .12);
    border-left-color: #f59e0b;
}

.processor-log-warn .processor-log-level,
.processor-log-warn .processor-log-message {
    color: #fde68a;
}

.processor-log-error {
    background: rgba(127, 29, 29, .22);
    border-left-color: #ef4444;
}

.processor-log-error .processor-log-level,
.processor-log-error .processor-log-message {
    color: #fca5a5;
}

.processor-log-muted {
    color: #94a3b8;
    display: block;
    padding: .8rem;
}

@media (max-width: 767.98px) {
    .processor-console-header {
        flex-direction: column;
    }

    .processor-console-actions,
    .processor-console-actions .btn {
        width: 100%;
    }

    .processor-console-meta {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Layout lateral moderno */
.regal-app-layout,
.regal-public-layout {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: 1.9rem;
    background: #fff;
}

.layout-main {
    position: relative;
    z-index: var(--z-layout-content);
    flex: 1 0 auto;
    width: 100%;
    min-height: calc(100vh - 1.9rem);
    min-height: calc(100dvh - 1.9rem);
    box-sizing: border-box;
    padding-top: 2.25rem !important;
    padding-bottom: 1rem !important;
    background-color: #fff;
    transition: filter .25s ease;
}

/* Reserva estable para los accesos flotantes de menu, avisos y ajustes. */
.regal-app-layout .layout-main {
    padding-top: 4rem !important;
}

.layout-main.container-fluid {
    width: 100%;
    max-width: none;
    padding-right: clamp(1rem, 2vw, 2.5rem) !important;
    padding-left: clamp(1rem, 2vw, 2.5rem) !important;
}

/* Cada vista ocupa el ancho del layout; sus paneles internos conservan su medida. */
.layout-main > :where(div, section, article, form) {
    width: 100%;
    min-width: 0;
    max-width: none;
    margin-right: 0;
    margin-left: 0;
}

/* Compatibilidad con vistas que aun conservan un container de Bootstrap. */
.layout-main > .container,
.layout-main > .container-fluid {
    width: 100%;
    max-width: none !important;
    margin-right: 0;
    margin-left: 0;
    padding-right: 0 !important;
    padding-left: 0 !important;
}

/* Listados de documentos: cuadrícula fluida sin desplazamiento horizontal. */
.document-list-host {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: visible !important;
}

.document-list-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    width: 100%;
    min-width: 0;
}

.document-list-item,
.document-list-link,
.document-list-card,
.document-list-card .card-body {
    min-width: 0;
}

.document-list-link {
    display: block;
    height: 100%;
}

.document-list-card {
    margin: 0;
    overflow: hidden;
}

.document-list-card .card-body {
    padding: 1rem 1.1rem;
}

.document-list-card .card-body,
.document-list-card .card-body * {
    overflow-wrap: anywhere;
}

/* Documentos financieros: filtro por estado y lectura visual inmediata del estado. */
.presupuesto-state-filter,
.factura-state-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #d8e0eb;
}

.presupuesto-state-filter__label,
.factura-state-filter__label {
    margin-right: .15rem;
    color: #27436e;
    font-size: .82rem;
    font-weight: 700;
}

.presupuesto-state-filter__button,
.factura-state-filter__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .42rem;
    min-height: 2.35rem;
    padding: .4rem .72rem;
    border: 1px solid #aebbd0;
    border-radius: .35rem;
    background: #fff;
    color: #172b4d;
    font-size: .86rem;
    font-weight: 600;
    box-shadow: none;
}

.presupuesto-state-filter__button:hover,
.presupuesto-state-filter__button:focus,
.factura-state-filter__button:hover,
.factura-state-filter__button:focus {
    border-color: #27436e;
    background: #eef4fb;
    color: #172b4d;
}

.presupuesto-state-filter__button.active,
.factura-state-filter__button.active {
    border-color: #27436e;
    background: #27436e;
    color: #fff;
    box-shadow: 0 .25rem .65rem rgba(39, 67, 110, .22);
}

.presupuesto-state-filter__dot,
.presupuesto-status-badge__dot,
.factura-state-filter__dot,
.factura-status-badge__dot {
    width: .52rem;
    height: .52rem;
    flex: 0 0 .52rem;
    border-radius: 50%;
    background: #64748b;
}

.presupuesto-state-filter__count,
.factura-state-filter__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.35rem;
    padding: 0 .35rem;
    border-radius: .3rem;
    background: #e8edf4;
    color: #172b4d;
    font-size: .72rem;
    font-weight: 700;
}

.presupuesto-state-filter__button.active .presupuesto-state-filter__count,
.factura-state-filter__button.active .factura-state-filter__count {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

.presupuesto-filter-layout {
    display: grid;
    gap: .85rem;
}

.presupuesto-filter-layout__primary,
.presupuesto-filter-layout__secondary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    align-items: end;
}

.presupuesto-filter-field {
    min-width: 0;
}

.presupuesto-filter-field .form-label {
    margin-bottom: .35rem;
}

.presupuesto-filter-layout__clear {
    align-self: end;
}

.presupuesto-list-card,
.factura-list-card {
    position: relative;
    border: 1px solid #d7dee9;
    border-left: .36rem solid #64748b;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.presupuesto-list-card:hover,
.factura-list-card:hover {
    border-color: #9eb0c9;
    box-shadow: 0 .45rem 1.1rem rgba(23, 43, 77, .13);
    transform: translateY(-1px);
}

.presupuesto-list-card__number,
.factura-list-card__number {
    color: #172b4d;
    font-size: 1rem;
    font-weight: 750;
}

.presupuesto-status-badge,
.factura-status-badge {
    display: inline-flex;
    align-items: center;
    gap: .38rem;
    max-width: 52%;
    min-height: 1.9rem;
    padding: .4rem .65rem;
    border: 1px solid #cbd5e1;
    border-radius: .3rem;
    background: #eef2f7;
    color: #334155;
    font-size: .8rem;
    font-weight: 800;
    line-height: 1.1;
    text-align: right;
}

.presupuesto-list-card[data-estado*="borrador" i] {
    border-left-color: #64748b;
    background: #fbfcfe;
}

.presupuesto-status-badge[data-estado*="borrador" i] {
    border-color: #cbd5e1;
    background: #e9eef5;
    color: #334155;
}

.presupuesto-state-filter__button[data-estado*="borrador" i] .presupuesto-state-filter__dot,
.presupuesto-status-badge[data-estado*="borrador" i] .presupuesto-status-badge__dot {
    background: #64748b;
}

.presupuesto-list-card[data-estado*="enviad" i] {
    border-left-color: #1261a6;
    background: #f6faff;
}

.presupuesto-status-badge[data-estado*="enviad" i] {
    border-color: #9cc5e8;
    background: #dceefe;
    color: #0b4f86;
}

.presupuesto-state-filter__button[data-estado*="enviad" i] .presupuesto-state-filter__dot,
.presupuesto-status-badge[data-estado*="enviad" i] .presupuesto-status-badge__dot {
    background: #1261a6;
}

.presupuesto-list-card[data-estado*="acept" i] {
    border-color: #79c794;
    border-left-color: #087a35;
    background: #eaf8ef;
}

.presupuesto-status-badge[data-estado*="acept" i] {
    border-color: #62bd82;
    background: #c9efd6;
    color: #075d29;
}

.presupuesto-state-filter__button[data-estado*="acept" i] .presupuesto-state-filter__dot,
.presupuesto-status-badge[data-estado*="acept" i] .presupuesto-status-badge__dot {
    background: #15803d;
}

.presupuesto-list-card[data-estado*="rechaz" i] {
    border-color: #eb9188;
    border-left-color: #bd2117;
    background: #fff0ee;
}

.presupuesto-status-badge[data-estado*="rechaz" i] {
    border-color: #df746a;
    background: #ffd2cd;
    color: #8f1811;
}

.presupuesto-state-filter__button[data-estado*="rechaz" i] .presupuesto-state-filter__dot,
.presupuesto-status-badge[data-estado*="rechaz" i] .presupuesto-status-badge__dot {
    background: #b42318;
}

.presupuesto-list-card[data-estado*="factur" i] {
    border-left-color: #6d3fb1;
    background: #fbf8ff;
}

.presupuesto-status-badge[data-estado*="factur" i] {
    border-color: #c8afe9;
    background: #eee4fb;
    color: #54308b;
}

.presupuesto-state-filter__button[data-estado*="factur" i] .presupuesto-state-filter__dot,
.presupuesto-status-badge[data-estado*="factur" i] .presupuesto-status-badge__dot {
    background: #6d3fb1;
}

.presupuesto-list-card[data-estado*="pendiente" i] {
    border-left-color: #b7791f;
    background: #fffaf0;
}

.presupuesto-status-badge[data-estado*="pendiente" i] {
    border-color: #e7c785;
    background: #fff0c7;
    color: #805516;
}

.presupuesto-state-filter__button[data-estado*="pendiente" i] .presupuesto-state-filter__dot,
.presupuesto-status-badge[data-estado*="pendiente" i] .presupuesto-status-badge__dot {
    background: #b7791f;
}

.factura-list-card__summary {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-end;
    gap: .35rem;
    text-align: right;
}

.factura-list-card__total {
    color: #172b4d;
    font-size: 1rem;
    font-weight: 800;
}

.factura-status-badge {
    max-width: 100%;
}

.factura-list-card[data-estado*="borrador" i] {
    border-left-color: #64748b;
    background: #fbfcfe;
}

.factura-status-badge[data-estado*="borrador" i] {
    border-color: #cbd5e1;
    background: #e9eef5;
    color: #334155;
}

.factura-state-filter__button[data-estado*="borrador" i] .factura-state-filter__dot,
.factura-status-badge[data-estado*="borrador" i] .factura-status-badge__dot {
    background: #64748b;
}

.factura-list-card[data-estado*="emitid" i] {
    border-left-color: #1261a6;
    background: #f6faff;
}

.factura-status-badge[data-estado*="emitid" i] {
    border-color: #9cc5e8;
    background: #dceefe;
    color: #0b4f86;
}

.factura-state-filter__button[data-estado*="emitid" i] .factura-state-filter__dot,
.factura-status-badge[data-estado*="emitid" i] .factura-status-badge__dot {
    background: #1261a6;
}

.factura-list-card[data-estado*="pagad" i],
.factura-list-card[data-estado*="cobrad" i],
.factura-list-card[data-estado*="abonad" i] {
    border-color: #79c794;
    border-left-color: #087a35;
    background: #eaf8ef;
}

.factura-status-badge[data-estado*="pagad" i],
.factura-status-badge[data-estado*="cobrad" i],
.factura-status-badge[data-estado*="abonad" i] {
    border-color: #62bd82;
    background: #c9efd6;
    color: #075d29;
}

.factura-state-filter__button[data-estado*="pagad" i] .factura-state-filter__dot,
.factura-state-filter__button[data-estado*="cobrad" i] .factura-state-filter__dot,
.factura-state-filter__button[data-estado*="abonad" i] .factura-state-filter__dot,
.factura-status-badge[data-estado*="pagad" i] .factura-status-badge__dot,
.factura-status-badge[data-estado*="cobrad" i] .factura-status-badge__dot,
.factura-status-badge[data-estado*="abonad" i] .factura-status-badge__dot {
    background: #15803d;
}

.factura-list-card[data-estado*="diferencia" i],
.factura-list-card[data-estado*="pendiente" i],
.factura-list-card[data-estado*="parcial" i] {
    border-color: #e7c785;
    border-left-color: #b7791f;
    background: #fffaf0;
}

.factura-status-badge[data-estado*="diferencia" i],
.factura-status-badge[data-estado*="pendiente" i],
.factura-status-badge[data-estado*="parcial" i] {
    border-color: #e7c785;
    background: #fff0c7;
    color: #805516;
}

.factura-state-filter__button[data-estado*="diferencia" i] .factura-state-filter__dot,
.factura-state-filter__button[data-estado*="pendiente" i] .factura-state-filter__dot,
.factura-state-filter__button[data-estado*="parcial" i] .factura-state-filter__dot,
.factura-status-badge[data-estado*="diferencia" i] .factura-status-badge__dot,
.factura-status-badge[data-estado*="pendiente" i] .factura-status-badge__dot,
.factura-status-badge[data-estado*="parcial" i] .factura-status-badge__dot {
    background: #b7791f;
}

.factura-list-card[data-estado*="anulad" i],
.factura-list-card[data-estado*="cancel" i],
.factura-list-card[data-estado*="rechaz" i] {
    border-color: #eb9188;
    border-left-color: #bd2117;
    background: #fff0ee;
}

.factura-status-badge[data-estado*="anulad" i],
.factura-status-badge[data-estado*="cancel" i],
.factura-status-badge[data-estado*="rechaz" i] {
    border-color: #df746a;
    background: #ffd2cd;
    color: #8f1811;
}

.factura-state-filter__button[data-estado*="anulad" i] .factura-state-filter__dot,
.factura-state-filter__button[data-estado*="cancel" i] .factura-state-filter__dot,
.factura-state-filter__button[data-estado*="rechaz" i] .factura-state-filter__dot,
.factura-status-badge[data-estado*="anulad" i] .factura-status-badge__dot,
.factura-status-badge[data-estado*="cancel" i] .factura-status-badge__dot,
.factura-status-badge[data-estado*="rechaz" i] .factura-status-badge__dot {
    background: #b42318;
}

.factura-list-card[data-estado*="rectific" i] {
    border-left-color: #6d3fb1;
    background: #fbf8ff;
}

.factura-status-badge[data-estado*="rectific" i] {
    border-color: #c8afe9;
    background: #eee4fb;
    color: #54308b;
}

.factura-state-filter__button[data-estado*="rectific" i] .factura-state-filter__dot,
.factura-status-badge[data-estado*="rectific" i] .factura-status-badge__dot {
    background: #6d3fb1;
}

@media (max-width: 575.98px) {
    .presupuesto-state-filter,
    .factura-state-filter {
        align-items: stretch;
        gap: .4rem;
    }

    .presupuesto-state-filter__label,
    .factura-state-filter__label {
        width: 100%;
    }

    .presupuesto-state-filter__button,
    .factura-state-filter__button {
        flex: 1 1 calc(50% - .4rem);
    }

    .presupuesto-filter-layout__primary,
    .presupuesto-filter-layout__secondary {
        grid-template-columns: minmax(0, 1fr);
        gap: .7rem;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .presupuesto-filter-layout__primary,
    .presupuesto-filter-layout__secondary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .presupuesto-filter-layout__clear {
        grid-column: 2;
    }
}

@media (min-width: 576px) {
    .document-list-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .document-list-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1500px) {
    .document-list-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.layout-public-header {
    position: relative;
    z-index: 1020;
    width: 100%;
    min-height: 4.25rem;
    padding: .55rem 1rem;
    background: transparent;
}

.layout-public-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 3.15rem;
    padding: .35rem .55rem .35rem .85rem;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: .8rem;
    background: linear-gradient(110deg, rgba(39, 67, 110, .98), rgba(16, 24, 39, .98));
    box-shadow: 0 .8rem 2rem rgba(15, 23, 42, .18);
}

.layout-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 4rem;
    color: #fff;
    text-decoration: none;
}

.layout-brand:hover {
    color: #fff;
    text-decoration: none;
}

.layout-brand-logo {
    width: 6.4rem;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 .6rem 1.2rem rgba(0, 0, 0, .25));
}

.layout-brand-public {
    gap: .65rem;
    min-height: 0;
}

.layout-brand-public .layout-brand-logo {
    width: 4.25rem;
    max-height: 2.65rem;
    filter: drop-shadow(0 .35rem .7rem rgba(0, 0, 0, .22));
}

.layout-brand.layout-brand-public .layout-public-brand-copy strong {
    color: #fff;
    font-size: .92rem;
    font-weight: 700;
}

.layout-brand.layout-brand-public .layout-public-brand-copy small {
    margin-top: .2rem;
    color: #b8cdf2;
    font-size: .68rem;
    font-weight: 500;
}

.layout-public-access {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: .65rem;
    color: #dbeafe;
    background: rgba(255, 255, 255, .08);
}

.layout-brand span {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.layout-brand strong {
    font-size: 1rem;
    letter-spacing: .02em;
}

.layout-brand small {
    color: #9fb3d7;
    font-size: .7rem;
}

.layout-hover-rail {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: var(--z-layout-rail);
    width: .65rem;
}

.layout-notifications-rail {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: var(--z-layout-rail);
    width: .65rem;
}

.layout-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-layout-overlay);
    pointer-events: none;
    opacity: 0;
    background: rgba(9, 16, 29, .48);
    backdrop-filter: blur(2px);
    transition: opacity .22s ease;
}

.layout-menu-toggle {
    position: relative;
    z-index: 1;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: .28rem;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: .85rem;
    color: #fff;
    background: linear-gradient(145deg, #27436e 0%, #101827 100%);
    box-shadow: 0 .9rem 2rem rgba(15, 23, 42, .26);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.layout-menu-toggle:hover,
.layout-menu-toggle:focus {
    transform: none;
    outline: none;
    box-shadow: 0 1rem 2.25rem rgba(15, 23, 42, .34);
}

.layout-menu-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 0 0 auto;
    gap: .28rem;
    width: 1.25rem;
    height: .95rem;
    overflow: visible;
    transform: translate(-50%, -50%);
}

.layout-menu-toggle .layout-menu-icon > span {
    display: block;
    width: 1.25rem;
    height: .13rem;
    margin-inline: auto;
    border-radius: 1rem;
    background: #fff;
    transition: transform .2s ease, opacity .2s ease;
}

.layout-menu-visible .layout-menu-toggle .layout-menu-icon > span:nth-child(1) {
    transform: translateY(.41rem) rotate(45deg);
}

.layout-menu-visible .layout-menu-toggle .layout-menu-icon > span:nth-child(2) {
    opacity: 0;
}

.layout-menu-visible .layout-menu-toggle .layout-menu-icon > span:nth-child(3) {
    transform: translateY(-.41rem) rotate(-45deg);
}

@keyframes layout-action-button-pop {
    0%, 100% { transform: scale(1); }
    35% { transform: scale(1.1); }
    65% { transform: scale(.96); }
}

.layout-action-button-animating {
    animation: layout-action-button-pop .4s cubic-bezier(.2, .8, .2, 1);
    transform-origin: center;
    will-change: transform;
}

.layout-top-actions .layout-action-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 1.5rem;
    height: 1.5rem;
    margin: 0;
    line-height: 1;
    text-align: center;
    pointer-events: none;
    transform: translate(-50%, -50%);
}

.layout-top-actions .layout-action-icon > i {
    display: block;
    width: 1.25em;
    margin: 0;
    line-height: 1;
    text-align: center;
    transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .layout-action-button-animating {
        animation: none;
    }
}

.layout-top-actions {
    position: fixed;
    top: .75rem;
    left: 50%;
    right: auto;
    z-index: var(--z-layout-actions);
    display: flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    max-width: calc(100vw - 2rem);
    transform: translateX(-50%);
    pointer-events: none;
}

.layout-actions-list {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin: 0;
    padding: 0;
    list-style: none;
    pointer-events: auto;
}

.layout-actions-list .nav-item {
    position: relative;
    z-index: var(--z-layout-actions);
    display: flex;
    align-items: center;
    height: 2.75rem;
    margin-top: 0;
    margin-bottom: 0;
    line-height: 0;
    list-style: none;
}

.layout-action-button,
.layout-actions-list .nav-link,
.layout-actions-list .btn.nav-link {
    position: relative;
    z-index: var(--z-layout-actions);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, .18) !important;
    border-radius: .85rem;
    color: #fff !important;
    background: linear-gradient(145deg, #27436e 0%, #101827 100%) !important;
    box-shadow: 0 .9rem 2rem rgba(15, 23, 42, .18);
    backdrop-filter: blur(12px);
    text-decoration: none;
    vertical-align: top;
}

.layout-actions-list .nav-link:hover,
.layout-actions-list .btn.nav-link:hover,
.layout-action-button:hover {
    color: #fff !important;
    background: #27436e !important;
    text-decoration: none;
}

.layout-config-menu .dropdown-toggle::after,
.layout-actions-list .dropdown-toggle::after {
    display: none;
}

.layout-config-menu .dropdown-menu {
    z-index: var(--z-layout-action-menu);
}

.layout-actions-list .pwa-notifications {
    z-index: var(--z-layout-actions);
}

.layout-actions-list .pwa-notifications > #btnNotificationsBell {
    z-index: var(--z-layout-action-active);
}

.layout-menu-visible .layout-menu-toggle,
.layout-notifications-visible #btnNotificationsBell,
.layout-config-menu.show > .layout-action-button {
    border-color: rgba(255, 255, 255, .34) !important;
    background: #27436e !important;
    box-shadow: 0 1rem 2.25rem rgba(15, 23, 42, .34);
}

.layout-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: var(--z-layout-panel);
    width: min(21.5rem, calc(100vw - 2rem));
    padding: .8rem;
    transform: translateX(calc(-100% - 1.25rem));
    transition: transform .28s cubic-bezier(.2, .8, .2, 1);
    pointer-events: none;
}

.layout-notifications-panel {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: var(--z-layout-panel);
    width: min(25rem, calc(100vw - 2rem));
    padding: .8rem;
    transform: translateX(calc(100% + 1.25rem));
    transition: transform .28s cubic-bezier(.2, .8, .2, 1);
    pointer-events: none;
}

.layout-notifications-visible .layout-notifications-panel {
    transform: translateX(0);
    pointer-events: auto;
}

.layout-notifications-panel-inner {
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(39, 67, 110, .18);
    border-radius: 1.15rem;
    background: #fff;
    box-shadow: 0 1.8rem 4rem rgba(15, 23, 42, .34);
}

.layout-panel-pin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid #d6dfeb;
    border-radius: .55rem;
    color: #27436e;
    background: #f6f9fd;
    cursor: pointer;
    transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.layout-panel-pin:hover,
.layout-panel-pin:focus {
    border-color: #27436e;
    color: #fff;
    background: #27436e;
    outline: none;
}

.layout-panel-pin[aria-pressed="true"] {
    border-color: #27436e;
    color: #fff;
    background: #27436e;
    box-shadow: 0 .35rem .8rem rgba(39, 67, 110, .24);
}

.layout-panel-pin i {
    transition: transform .18s ease;
}

.layout-panel-pin[aria-pressed="true"] i {
    transform: rotate(-45deg);
}

.layout-menu-visible .layout-sidebar {
    transform: translateX(0);
    pointer-events: auto;
}

.layout-sidebar-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 1.25rem;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(39, 67, 110, .96) 0%, rgba(16, 24, 39, .98) 100%),
        #101827;
    box-shadow: 0 1.8rem 4rem rgba(15, 23, 42, .36);
    backdrop-filter: blur(16px);
    overflow-y: auto;
}

.layout-menu-pin {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    border-color: rgba(255, 255, 255, .2);
    color: #dbeafe;
    background: rgba(255, 255, 255, .08);
}

.layout-menu-pin:hover,
.layout-menu-pin:focus,
.layout-menu-pin[aria-pressed="true"] {
    border-color: rgba(255, 255, 255, .5);
    color: #fff;
    background: rgba(255, 255, 255, .18);
}

.layout-nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: .25rem;
    min-height: 0;
    margin-top: 1rem;
}

.layout-nav-section {
    margin: 1rem .65rem .35rem;
    color: #9fb3d7;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.layout-nav-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 2.85rem;
    padding: .7rem .8rem;
    border: 1px solid transparent;
    border-radius: .85rem;
    color: #f7fbff;
    font-weight: 700;
    text-decoration: none;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.layout-nav-link i {
    display: inline-flex;
    justify-content: center;
    width: 1.25rem;
    color: #b8cdf2;
}

.layout-nav-link:hover,
.layout-nav-link:focus,
.layout-nav-dropdown.show > .layout-nav-link {
    color: #fff;
    border-color: rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .1);
    text-decoration: none;
    transform: translateX(.12rem);
}

.layout-nav-link-danger {
    color: #fecaca;
}

.layout-nav-link-danger i {
    color: #f87171;
}

.layout-nav-spacer {
    flex: 1 1 auto;
    min-height: 1rem;
}

.layout-sidebar .dropdown-menu {
    position: static !important;
    float: none;
    width: 100%;
    min-width: 0;
    margin: .35rem 0 .55rem;
    padding: 0 .15rem;
    transform: none !important;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.layout-nav-dropdown.show > .dropdown-menu {
    display: grid;
    gap: .35rem;
}

.layout-sidebar .dropdown-item {
    display: flex;
    align-items: center;
    min-height: 2.55rem;
    padding: .55rem .7rem;
    border: 1px solid rgba(184, 205, 242, .13);
    border-radius: .55rem;
    color: #e8f1ff;
    background: rgba(8, 15, 28, .3);
    font-weight: 600;
    box-shadow: 0 .25rem .65rem rgba(3, 8, 18, .1);
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.layout-sidebar .dropdown-item i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    margin-right: .55rem !important;
    border-radius: .4rem;
    color: #c9dbfa;
    background: rgba(117, 151, 205, .13);
}

.layout-sidebar .dropdown-item:hover,
.layout-sidebar .dropdown-item:focus {
    color: #fff;
    border-color: rgba(184, 205, 242, .3);
    background: rgba(69, 103, 155, .34);
    transform: translateX(.12rem);
}

.layout-settings-menu .layout-nav-subheading {
    display: block;
    margin: .5rem .55rem .15rem;
    color: #9fb3d7;
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.layout-settings-menu .layout-nav-subheading:first-child {
    margin-top: .15rem;
}

.layout-menu-visible .layout-menu-overlay,
.layout-notifications-visible .layout-menu-overlay {
    opacity: 1;
}

.layout-footer {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: var(--z-layout-footer);
    min-height: 1.9rem;
    box-shadow: 0 -.5rem 1.25rem rgba(15, 23, 42, .12);
    transform: translateY(0);
    pointer-events: auto;
}

@media (min-width: 768px) {
    .layout-menu-overlay {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .layout-actions-list > .nav-item {
        display: flex;
        align-items: center;
        height: 2.75rem;
        margin-top: 0;
        margin-bottom: 0;
        line-height: 1;
    }

    .layout-actions-list .layout-menu-toggle,
    .layout-actions-list .layout-action-button,
    .layout-actions-list #btnNotificationsBell {
        flex: 0 0 2.75rem;
        width: 2.75rem;
        height: 2.75rem;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        vertical-align: top;
    }

    .regal-app-layout,
    .regal-public-layout {
        padding-bottom: 1.9rem;
    }

    .layout-main.container {
        width: 100%;
        max-width: 100%;
    }

    .layout-main {
        padding-top: 4rem !important;
        padding-right: 1rem !important;
        padding-left: 1rem !important;
    }

    .regal-public-layout .layout-main {
        padding-top: 1.5rem !important;
    }

    .layout-public-header {
        min-height: 3.85rem;
        padding: .45rem .55rem;
    }

    .layout-public-header-inner {
        min-height: 3rem;
        padding-left: .7rem;
    }

    .layout-brand-public .layout-brand-logo {
        width: 3.75rem;
    }

    .layout-brand.layout-brand-public .layout-public-brand-copy strong {
        font-size: .82rem;
    }

    .layout-brand.layout-brand-public .layout-public-brand-copy small {
        font-size: .62rem;
    }

    .layout-top-actions {
        top: .75rem;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }

    .layout-menu-control {
        order: -1;
        margin-right: .25rem;
    }

    .layout-sidebar {
        inset: 0 0 auto;
        width: 100vw;
        max-height: 100dvh;
        padding: .55rem .55rem .75rem;
        transform: translateY(calc(-100% - 1rem));
        transition: transform .32s cubic-bezier(.2, .8, .2, 1);
    }

    .layout-menu-visible .layout-sidebar {
        transform: translateY(0);
    }

    .layout-sidebar-inner {
        height: auto;
        max-height: calc(100dvh - 1.3rem);
        border-radius: 1rem;
    }

    .layout-notifications-panel {
        inset: 0 0 auto;
        width: 100vw;
        max-height: 100dvh;
        padding: .55rem .55rem .75rem;
        transform: translateY(calc(-100% - 1rem));
        transition: transform .32s cubic-bezier(.2, .8, .2, 1);
    }

    .layout-notifications-visible .layout-notifications-panel {
        transform: translateY(0);
    }

    .layout-notifications-panel-inner {
        height: auto;
        max-height: calc(100dvh - 1.3rem);
        border-radius: 1rem;
    }

    .pwa-notifications-menu {
        height: auto;
        max-height: calc(100dvh - 1.3rem);
    }

    .pwa-notifications-list {
        flex: 0 1 auto;
        max-height: calc(100dvh - 12rem);
    }

    .layout-menu-visible .layout-menu-overlay,
    .layout-notifications-visible .layout-menu-overlay {
        pointer-events: auto;
    }

    .layout-menu-overlay {
        background: rgba(9, 16, 29, .14);
        backdrop-filter: none;
    }

    .layout-brand-logo {
        width: 5.4rem;
    }

}
