@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

:root {
    --colorFondo: #ffffff;
    --ColorTexto: #38245C;
    --colorClaro: #e7e9ef;
    --colorMedio: #9da7bf;
    --colorOscuro: #0b235e;
    --colorLink: #0b235e;
    --colorBoton: #0b235e;
    --colorFondoCabeceraTabla: #e9ecef;
    --colorFilaAlternaTabla: #f1f2f3;
    --colorPendiente: #ffefca;
    --colorTomando: #c1e8d0;
    --colorEncurso: #ebded3;
    --colorTerminado: #47397e;
    --colorAnulado: #f07662;
    --colorPrevistaApp: #ffc107;    /* ámbar          */
    --colorTomandoApp: #28a745;     /* verde          */
    --colorAnalizandoApp: #6c757d;  /* gris neutro    */
    --colorTerminadaApp: #17a2b8;   /* turquesa       */
    --colorCanceladaApp: #dc3545;   /* rojo           */
}

html, body {
    font-family: "poppins" sans-serif; /*    'Helvetica Neue', Helvetica, Arial,*/
    color: var(--ColorTexto);
}

html {
    box-sizing: border-box;
}

body {
    background-color: var(--colorFondo);
}

a {
    cursor: pointer;
    color: var(--colorLink);
    font-weight: bold;
}

.izquierda {
    text-align: left;
}

.centro {
    text-align: center;
}

.derecha {
    text-align: right;
}

.btn {
    color: white;
    background-color: var(--colorBoton);
}

.btn-invisible {
    border-width: 0;
    border-radius: 2rem;
}

thead th {
    color: white;
    background-color: var(--colorFondoCabeceraTabla);
    font-weight: bold;
    text-align: center;
}

.tfoot > td {
    font-weight: bold;
}

/* ---------- tabla minimalista ---------- */
.mini-table {
    max-width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
    border-radius: .5rem;
    overflow: hidden;
    overflow-x: auto;
    width: max-content;
    align-self: center;
}

    .mini-table th,
    .mini-table td {
        border: 1px solid #d7dce1;
        padding: 6px 8px;
        vertical-align: middle;
    }

    .mini-table thead th {
        background: eff0f2;
        font-weight: 600;
        text-align: center;
        color: black
    }

    .mini-table tbody tr:nth-child(odd) {
        background: #fafbfc;
    }

    .mini-table .text-end {
        text-align: right
    }

    .mini-table .icon-btn {
        background: none;
        border: 0;
        padding: 0;
        cursor: pointer;
        color: #0b235e
    }

    .mini-table .cabeceraVertical {
        writing-mode: vertical-lr;
        -ms-writing-mode: tb-rl;
        transform: rotate(180deg);
        vertical-align: middle;
    }

    .mini-table tbody tr:hover td,
    .mini-table tbody tr:hover th {
        background-color: #e8f2ff;
    }

.table-striped tbody tr:nth-of-type(odd) { /* Filas impares */
    background-color: var(--colorFilaAlternaTabla);
}

.table {
    table-layout: auto;
    width: 100%;
}

.tablaDocs {
    overflow-y: scroll;
    overflow-x: hidden;
}

/* ---------------- Tarjetas Columnas Editables ----------------- */
.tarjeta-columnas-precio {
    display: grid;
    grid-template-columns: 2fr 2fr 6rem 4.5rem 4.5rem 7rem;
    column-gap: .5rem;
    flex: 1 1 auto; /* que se estire a todo el ancho */
    align-items: start; /* arriba de la celda */
}

    /* ---- Celda con etiqueta arriba y valor abajo ------------------ */
    .tarjeta-columnas-precio .campo {
        display: flex;
        flex-direction: column; /* etiqueta arriba, valor abajo */
        align-items: flex-end; /* todo a la derecha */
        line-height: 1.1;
    }

        .tarjeta-columnas-precio .campo small {
            font-size: .9rem;
            color: #6c757d;
            font-weight: 400;
        }

        .tarjeta-columnas-precio .campo strong {
            font-weight: 600;
        }

        /* TextoEditable hereda el right-align: */
        .tarjeta-columnas-precio .campo input {
            text-align: right;
        }

    .tarjeta-columnas-precio .titulo {
        overflow-wrap: anywhere; /* palabra muy larga  se parte */
        white-space: normal; /* permite saltos de línea */
    }

    .tarjeta-columnas-precio .cantidad {
        text-align: right;
    }

    .tarjeta-columnas-precio .precio {
        text-align: right;
    }

    .tarjeta-columnas-precio .dto {
        text-align: right;
    }

    .tarjeta-columnas-precio .total {
        text-align: right;
        font-weight: 600;
        justify-self: end;
    }

.tarjeta-columnas-totales {
    display: grid;
    grid-template-columns: minmax(0,2fr) /* descripción */
                            4.5rem /* cantidad   */
                            6rem /* precio     */
                            4rem /* dto %      */
                            7rem /* importe / base */
                            4rem /* % IVA      */
                            6rem /* importe IVA*/
                            7rem; /* total final*/
    column-gap: .5rem;
    align-items: start;
    flex: 1 1 auto; /* que se estire a todo el ancho */
}

    /* ---- Celda con etiqueta arriba y valor abajo ------------------ */
    .tarjeta-columnas-totales .campo {
        display: flex;
        flex-direction: column; /* etiqueta arriba, valor abajo */
        align-items: flex-end; /* todo a la derecha */
        line-height: 1.1;
    }

/* Grid de metadatos (4 columnas) */
.tarjeta-columnas-meta {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1fr; /* ajusta si quieres */
    column-gap: .5rem;
    align-items: start;
}

    /* Igual que estás usando en las columnas de precio */
    .tarjeta-columnas-meta .campo {
        display: flex;
        flex-direction: column;
        gap: .15rem;
        min-width: 0; /* para que no desborde */
    }

        .tarjeta-columnas-meta .campo small {
            opacity: .7;
            line-height: 1;
            white-space: nowrap;
        }


.radioHorizontal {
    display: flex;
    align-items: center;
}

fieldset {
    background-color: #eeeeee;
    display: block;
    margin-left: 2px;
    margin-right: 2px;
    padding-top: 0.35em;
    padding-bottom: 0.625em;
    padding-left: 0.75em;
    padding-right: 0.75em;
    border: 2px groove (internal value);
}

legend {
    background-color: gray;
    color: white;
    padding: 5px 10px;
}

.checkbox-container-vertical {
    display: flex;
    flex-direction: column;
}

.checkbox-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px; /* Ajusta según sea necesario */
}

    .checkbox-item:last-child {
        margin-bottom: 0; /* Elimina el margen del último elemento */
    }

    /* Ajuste de márgenes y paddings */
    .checkbox-item input,
    .checkbox-item label {
        margin: 0;
        padding: 0;
    }

.estadoPrevista {
    background-color: var(--colorPendiente);
    color: black;
    border-radius: .25rem;
    text-align: center;
}

.estadoTomando {
    background-color: var(--colorTomando);
    color: black;
    border-radius: .25rem;
    text-align: center;
}

#bg-estadoEncurso {
    background-color: var(--colorEncurso);
    color: var(--ColorTexto);
    border-radius: .25rem;
    text-align: center;
}

.estadoEncurso {
    background-color: var(--colorEncurso);
    color: var(--ColorTexto);
    border-radius: .25rem;
    text-align: center;
}

.estadoTerminado {
    background-color: var(--colorTerminado);
    color: var(--colorClaro);
    border-radius: .25rem;
    text-align: center;
}

.estadoAnulado {
    background-color: var(--colorAnulado);
    color: var(--colorClaro);
    border-radius: .25rem;
    text-align: center;
}

.estadoPrevistaApp {
    color: var(--colorPrevistaApp);
    background: rgba(var(--colorPrevistaApp-rgb,255,193,7),.10);
}

.estadoTomandoApp {
    color: var(--colorTomandoApp);
    background: rgba(var(--color-tomando-rgb,40,167,69),.10);
}

.estadoEncursoApp {
    color: var(--colorAnalizandoApp);
    background: rgba(var(--color-analizando-rgb,108,117,125),.10);
}

.estadoTerminadoApp {
    color: var(--colorTerminadaApp);
    background: rgba(var(--color-terminada-rgb,23,162,184),.10);
}

.estadoAnuladoApp {
    color: var(--colorCanceladaApp);
    background: rgba(var(--color-cancelada-rgb,220,53,69 ),.10);
}

#iframeDocs, .tablaDocs {
    /* height:680px !important; */
    height: 80vh !important;
}

/*.cambioSeleccion {
    color: white;
}*/

.login {
    width: 400px;
    padding: 35px;
    background-color: #fff;
    border-radius: 9px;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

    .login h1 {
        font-size: 25px;
        padding-bottom: 25px;
    }

/* modal */
.modal-xl {
    max-width: 90% !important;
}

.modal-body {
    overflow-x: auto;
}

.modal-dialog-custom {
    max-height: 90% !important;
}

.informacion-prefiltrado {
    background-color: #e9ecef;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* ---------------- Calendario  --------------------*/

.calendar-header {
    text-align: center;
    margin-bottom: 20px;
}

.calendar-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
}

.calendar-month {
    border: 1px solid #ccc;
    padding: .625rem;
    border-radius: 1rem;
}

    .calendar-month h4 {
        text-align: center;
        margin-top: 0 0 .5rem;
    }

.calendar-weekdays, .calendar-week {
    display: flex;
}

.calendar-weekday {
    flex: 1;
    height: 40px; 
    display: flex;
    align-items: center; 
    justify-content: center; 
    font-weight: 600;
    border: 1px solid #eee;
}

.calendar-day {
    flex: 1;
    border: 1px solid #eee;
    min-height: 80px; /*  tu altura original                 */
    display: flex;
    flex-direction: column;
}
    .calendar-day a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center; /*  centra HORIZONTAL                   */
        justify-content: center; /*  centra VERTICAL – opcional         */
        width: 100%;
        text-decoration: none;
        color: inherit;
    }

.calendar-day-number {
    background-color: #f0f0f0;
    color: #333;
    width: 100%; /* Ensure full width */
    text-align: center;
    padding: .25rem 0; /* Optional: Add padding for better appearance */
    box-sizing: border-box;
}

.calendar-day-info {
    font-weight: 700;
    color: #666;
    margin-top: .25rem;
    text-align: center;
}

.calendar-day:hover {
    background-color: f8f8f8;
}

.content {
    padding-top: 1.1rem;
}

/*----------------- filtros ------------------------*/

.filtros-contenedor {
    background-color: #f3f3f3; /* Fondo gris claro */
    padding: 20px;
    border-radius: 1rem;
    margin-bottom: 1rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.filtros-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filtros-titulo {
    font-size: 1.25rem;
    font-weight: bold;
    color: #333;
}

.filtros-botones {
    display: flex;
    gap: 10px;
}

/* Contenido de los Filtros */
.filtros-content {
    display: flex;
    flex-direction: column;
}

/* Estilos Existentes para Filtros de Fecha */
.row.g-3 {
    display: flex;
    gap: 15px;
}

.date-input {
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
}

.filtro-fecha {
    width: 45%;
}

/* Caja simple con título */
.marcofieldset {
    border: 1px solid #dfe3ea;
    border-radius: 6px; /* si lo quieres totalmente cuadrado, pon 0 */
    padding: .75rem 1rem 1rem;
    background: #fff;
}

    /* Título sobrio (legend) */
    .marcofieldset > legend {
        margin: 0 0 0 .5rem;
        padding: 0 .4rem;
        font-size: 1.25rem;
        font-weight: 600;
        color: inherit;
        background: #fff; /* tapa el borde por detrás */
    }

    /* Checkbox un poco más grande y con bordes redondeados (sólo dentro del marco) */
    .marcofieldset .form-check-input,
    .marcofieldset input[type="checkbox"] {
        width: 1.15em;
        height: 1.15em;
        border-radius: .35rem; /* esquinas redondeadas del check */
    }

    /* opcional: alinear label y check sin desplazamientos raros */
    .marcofieldset .form-check,
    .marcofieldset .checkbox-item {
        display: flex;
        align-items: center;
        gap: .5rem;
        margin: .25rem 0;
    }



/*----------------botones-------------------*/
.icon-button {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    color: #007bff;
    transition: color 0.3s ease;
}

    .icon-button:hover {
        color: #0056b3;
    }

/*-------------------cards---------------------*/
.card {
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    margin-bottom: 1rem
}

.alerta-header {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

.aviso-header {
    color: #ffc107;
    background-color: rgba(255, 193, 7, 0.1);
}

.normal-header {
    color: black;
    background-color: rgba(0, 0, 0, .03);
}

.card-custom-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    padding: .75rem 1.25rem;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(0, 0, 0, .125);
    border-radius: 12px 12px 0px 0px;
}

    .card-custom-header > span {
        flex: 1 1 100%;
        white-space: normal; /* permite saltos de línea normales */
        overflow-wrap: anywhere; /* parte palabras muuuy largas      */
        line-height: 1.2; /* un poco más compacto (opcional)  */
    }

.card-body {
    background-color: white;
    color: black;
    border-radius: 0px 0px 12px 12px;
    padding: 1rem;
}

.card-resumen {
    background-color: #f8f9fa;
    color: black;
    border-radius: 12px;
    padding: 1rem;
}

.dates-row {
    flex-direction: row;
    gap: 20px;
}

.date-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.card h5 {
    margin-top: 0;
    margin-bottom: 5px;
    font-size: 16px;
}

.card p {
    margin: 5px 0;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .filters-container {
        padding: 15px;
    }

    .card {
        width: 100%;
    }
}

/*------------------MultiselectorModal----------------------*/
/* Estilo del filtro de empresa */
.company-filter {
    border-radius: 1.5rem;
    margin-top: 1rem;
}

/* Estilos adicionales para la lista de checkboxes si es necesario */
.checkbox-list {
    /* Puedes agregar padding o márgenes adicionales si lo deseas */
}

/* Asegurar que los checkboxes no sean demasiado pequeños */
.form-check-input {
    width: 1.15em;
    height: 1.15em;
    border-radius: .35rem; /* bordes redondeados */
    accent-color: var(--colorBoton); /* color del tema (soporte moderno) */
    cursor: pointer;
}

/* ---------------- Ofertas --------------------------*/

.cabecera-tabla {
    background-color: #f0f0f0;
    color: #333;
    font-weight: 600;
}

@media print {
    .salto-pagina {
        page-break-before: always;
        /* Opcionalmente ocultar el div visualmente */
        display: block;
        height: 0;
        margin: 0;
        padding: 0;
        border: none;
    }
}

@media print {
    .no-imprimir {
        display: none !important;
    }
}

@media print {
    .cabecera-impresion {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
        background-color: white;
        border-bottom: 1px solid #ccc;
        overflow: hidden;
        z-index: 1000;
    }

    .salto-pagina + .seccion {
        margin-top: 80px; /* Compensa altura de cabecera fija */
    }

    body {
        margin-top: 70px;
    }
}

/* --- Visibilidad campos editables ------------------------------------ */
.editable-field {
    background: #f8f9fa;
    border: 1px dashed #1e60a2;
    border-radius: .5rem;
    padding: .15rem;
}

.obligatorio-vacio {
    border: 2px dotted #ff5f5f;
}

.editable-pointer {
    cursor: text;
}

/* --- Anulación al imprimir ------------------------------------------ */
@media print {

    /* Quita color, bordes y cursor */
    .editable-field,
    .obligatorio-vacio {
        background: transparent !important;
        border: none !important;
        cursor: inherit !important; /* evita el icono “texto” en PDF */
    }

    /* Si usas subrayado (border-bottom) ponlo aquí también */
    .editable-field {
        border-bottom: none !important;
    }
}


    /* ---------------- otros --------------------------*/

    #blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* CUSTOM CSS */

.main {
    padding: 15px;
}

.row {
    margin-bottom: 20px;
}

.navbar {
    color: var(--colorClaro);
    background-color: var(--colorOscuro);
    padding-top: 0;
    padding-bottom: 0;
    height: 60px;
    top: 0px !important;
}

    .navbar a {
        color: var(--colorClaro);
        background-color: var(--colorOscuro);
    }

.navbar {
}

.navbar-brand.logo {
    margin-left: 25px;
    margin-right: 25px;
}

.navbar-brand img {
    width: 100%;
    max-width: 200px;
}

.nav-tabs-app .nav-link {
    justify-content: space-between;
    font-size: clamp(.5rem, 4vw, 1.2rem);
    padding: .4rem .8rem; /* un poco más compacto */
}

.dropdown-submenu {
    position: relative;
}

    .dropdown-submenu .dropdown-menu {
        top: 0;
        left: 100%;
        margin-top: -1px;
    }

h1.tituloPagina {
    color: var(--colorClaro);
    text-transform: none !important;
    font-size: 18px;
    height: 40px;
    line-height: 40px;
    margin-bottom: 0px;
}

zIndex999 {
    z-index: 999;
}

/* Tabla datos, revisar */
:root {
    /* https://search.muz.li/MDQ1ZDJkMGYz */
    --colorRojo: #E74C3;
    --colorNaranja: #E67E22;
    --colorNaranjaClaro: rgb(250, 216, 155);
    --colorAmarillo: rgb(250, 2016, 155);
    --colorAzulOscuro: rgb(11, 45, 109);
    --colorAzulClaro: rgb(5,113,159);
    --colorVerdeClaro: #2ECC71;
    --colorVerdeOscuro: #16A085;
    --colorRosa: rgb(230, 141, 125);
    --colorMarron: rgb(154, 56, 19);
    --colorMorado: rgb(85, 39, 88);
    --colorGris: rgb(101, 139, 175);
    --colorGrisOscuro: rgb(66, 89, 111);
    --colorJornada: #e3ecfb;
    --colorAtencione: #e7fde5;
    --colorPausa: #fffacc;
    --colorAusencia: #f9e8e9;
}

