:root {
    --fondo-contenedor: #fff;
    /*--encabezado-tabla: #212529;*/
    
    --color-icono-acciones: #495057;
    --color-boton-acciones-hover: #e9ecef;
}

    /*contenedo para formularios*/
    .form-wrapper {
        background: var(--fondo-contenedor);
        padding: 1.25rem;
        border-radius: 0.5rem;
        box-shadow: 0 0.125rem 0.35rem rgba(0,0,0,0.05);
    }

    /*labels*/
    .form-label {
        font-size: 0.85rem;
        font-weight: 600;
        color: var(--color-labels);
        margin-bottom: 0.25rem;
    }

    /*inputs*/
    .form-control,
    .form-select {
        border-radius: 0.4rem;
        font-size: 0.9rem;
        border: 1px solid var(--color-borde-inputs);
        transition: all 0.2s ease;
    }

    /* focus moderno */
    .form-control:focus,
    .form-select:focus {
        border-color: var(--color-predominante);
        box-shadow: 0 0 0 0.15rem rgba(0, 98, 161, 0.2);
    }

    /*input group*/
    .input-group-text {
        background: var(--fondo-input-group-text);
        border: 1px solid var(--color-borde-inputs);
    }

    /*checkbox y radio*/
    .form-check {
        margin-bottom: 0.3rem;
    }

    .form-check-input {
        cursor: pointer;
    }

    .form-check-label {
        cursor: pointer;
        font-size: 0.85rem;
    }

    /*switch*/
    .form-switch .form-check-input {
        width: 2.2rem;
        height: 1.2rem;
    }

    .form-switch .form-check-input:checked {
        background-color: var(--color-predominante);
        border-color: var(--color-predominante);
    }

    /*input file*/
    input[type="file"] {
        font-size: 0.85rem;
    }

    /*input numero y fecha*/
    input[type="number"],
    input[type="date"] {
        text-align: left;
    }

    .btn-primary{
        color: var(--color-texto-botones);
        background-color: var(--color-predominante);
        border-color: var(--color-predominante);
    }

    /*botones de accion*/
    .btn-group a {
        padding: 0.35rem;
        margin: 0 0.15rem;
        border-radius: 0.35rem;
        transition: all 0.2s ease;
        color: var(--color-icono-acciones);
    }

    .btn-group a:hover {
        background: var(--color-boton-acciones-hover);
        transform: scale(1.1);
    }

    /*espaciado en formularios*/
    .row.g-3 > [class*="col-"] {
        margin-bottom: 0.5rem;
    }

    /*generales*/
    .card-shadow {
        box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.05);
    }

    .rounded-custom {
        border-radius: 0.5rem;
    }

     /*tablas*/
    /* CONTENEDOR */
    .tabla-pro {
        border-radius: 12px;
        overflow: hidden;
        background-color: var(--fondo-contenedor);
    }

    /* ENCABEZADO */
    .tabla-pro thead th {
        background-color: var(--color-predominante); /* gris oscuro moderno */
        color: var(--fondo-contenedor);
        font-weight: 600;
        letter-spacing: 0.5px;
        border: none;
    }



    /* FILAS */
    .tabla-pro tbody tr {
        transition: all 0.2s ease-in-out;
    }

    /* HOVER */
    .tabla-pro tbody tr:hover td {
        background-color: var(--color-hover-tabla) !important;
        transform: scale(1.01);
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    }

    /* CELDAS */
    .tabla-pro td {
        vertical-align: middle;
        border-color: #f1f1f1;
    }

    /* BOTONES DE ACCIONES */
    .tabla-pro .btn-group a {
        padding: 6px 10px;
        border-radius: 6px;
        transition: all 0.2s ease;
        color: var(--color-predominante);
    }

    .tabla-pro .btn-group a:hover {
        background-color: var(--fondo-contenedor);
        color: var(--color-sidebar);
    }

    /* ICONOS */
    .tabla-pro i {
        font-size: 14px;
    }

    /* CONTENEDOR FORMULARIO */
    .form-card {
        background: #ffffff;

        border-radius: 1rem;

        padding: 2rem;

        box-shadow: 0 0.25rem 1rem rgba(0,0,0,0.05);

        border: 1px solid #e9ecef;
    }

    /* LABELS */
    .form-card .form-label {
        font-weight: 500;
        color: var(--color-labels);
        margin-bottom: 0.4rem;
    }

    /* INPUTS */
    .form-card .form-control,
    .form-card .form-select {
        border-radius: 0.6rem;

        border: 1px solid var(--color-borde-inputs);

        padding: 0.65rem 0.9rem;

        transition: all 0.2s ease;
    }

    /* FOCUS */
    .form-card .form-control:focus,
    .form-card .form-select:focus {
        border-color: var(--color-predominante);

        box-shadow: 0 0 0 0.2rem rgba(0,98,161,0.15);
    }

    /* INPUT GROUP */
    .form-card .input-group-text {
        background: #f8f9fa;
        border-radius: 0.6rem 0 0 0.6rem;
    }

    /* RADIO Y CHECK */
    .form-card .form-check {
        margin-bottom: 0.5rem;
    }

    /* BOTONES */
    .form-card .btn {
        border-radius: 0.6rem;
        padding: 0.55rem 1.2rem;
    }

    /* TÍTULOS INTERNOS */
    .form-section-title {
        font-size: 1rem;
        font-weight: 600;
        color: #212529;

        margin-bottom: 1rem;

        border-bottom: 1px solid #e9ecef;

        padding-bottom: 0.5rem;
    }


/* QuickGrid Pagination Support */
.pagination {
    display: flex;
    padding-left: 0;
    list-style: none;
}
.page-item.active .page-link {
    z-index: 3;
    color: #fff;
    background-color: var(--color-predominante);
    border-color: var(--color-predominante);
}
.page-item.disabled .page-link {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}
.page-link {
    position: relative;
    display: block;
    color: #0d6efd;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid #dee2e6;
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
    padding: .375rem .75rem;
}
.page-link:hover {
    z-index: 2;
    color: #0a58ca;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

/* Fix sort icon color in QuickGrid headers */
.tabla-pro th .sort-indicator {
    color: var(--fondo-contenedor);
}

/* QuickGrid Headers overrides */
.tabla-pro thead th .col-title {
    color: var(--fondo-contenedor) !important;
    font-weight: 600;
}
.tabla-pro thead th .sort-indicator {
    color: var(--fondo-contenedor);
    opacity: 0.3;
    transition: opacity 0.2s;
    margin-left: 5px;
    /* Custom SVG arrows for QuickGrid sorting */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23ffffff" class="bi bi-chevron-expand" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M3.646 5.854a.5.5 0 0 1-.708-.708l5-5a.5.5 0 0 1 .708 0l5 5a.5.5 0 0 1-.708.708L8 1.707 3.646 5.854zm0 4.292a.5.5 0 0 0-.708.708l5 5a.5.5 0 0 0 .708 0l5-5a.5.5 0 0 0-.708-.708L8 14.293l-4.354-4.147z"/></svg>') !important;
    background-repeat: no-repeat;
    background-position: center;
    width: 16px;
    height: 16px;
    display: inline-block;
}

.tabla-pro thead th[aria-sort="ascending"] .sort-indicator {
    opacity: 1;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23ffffff" class="bi bi-caret-up-fill" viewBox="0 0 16 16"><path d="m7.247 4.86-4.796 5.481c-.566.647-.106 1.659.753 1.659h9.592a1 1 0 0 0 .753-1.659l-4.796-5.48a1 1 0 0 0-1.506 0z"/></svg>') !important;
}

.tabla-pro thead th[aria-sort="descending"] .sort-indicator {
    opacity: 1;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23ffffff" class="bi bi-caret-down-fill" viewBox="0 0 16 16"><path d="M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z"/></svg>') !important;
}

/* Fix QuickGrid default sort button taking up space without icon */
.tabla-pro th .col-options-button {
    display: none !important;
}

/* Custom Pagination styling */
.custom-pagination {
    gap: 0.3rem;
}

.custom-pagination .page-item .page-link {
    border-radius: 0.4rem !important;
    border: none;
    font-size: 0.85rem;
    font-weight: 500;
    color: #6c757d;
    background-color: #e9ecef;
    padding: 0.4rem 0.8rem;
    box-shadow: none;
}

.custom-pagination .page-item:not(.disabled) .page-link:hover {
    background-color: #dee2e6;
    color: #495057;
}

.custom-pagination .page-item.active .page-link {
    background-color: #0062A1 !important; /* var(--color-predominante) approx */
    color: #ffffff;
}

.custom-pagination .page-item.disabled .page-link {
    opacity: 0.6;
    background-color: #e9ecef;
}

/* Custom QuickGrid Styling for AppTable (Matching Reference Image) */

/* TABLE HEADERS */
.tabla-pro thead th {
    background-color: var(--color-predominante) !important;
    border-bottom: none;
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

/* Header Text */
.tabla-pro thead th .col-title {
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.9rem;
}

/* General Sort Indicator Icon Placeholder */
.tabla-pro thead th .sort-indicator {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    vertical-align: text-bottom;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* Inactive State (Not sorted): Double arrows, translucent white */
.tabla-pro thead th[aria-sort="none"] .sort-indicator {
    opacity: 0.35;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23ffffff" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M11.5 15a.5.5 0 0 0 .5-.5V2.707l3.146 3.147a.5.5 0 0 0 .708-.708l-4-4a.5.5 0 0 0-.708 0l-4 4a.5.5 0 1 0 .708.708L11 2.707V14.5a.5.5 0 0 0 .5.5zm-7-14a.5.5 0 0 1 .5.5v11.793l3.146-3.147a.5.5 0 0 1 .708.708l-4 4a.5.5 0 0 1-.708 0l-4-4a.5.5 0 0 1 .708-.708L4 13.293V1.5a.5.5 0 0 1 .5-.5z"/></svg>');
}

/* Hover over inactive: slightly more visible */
.tabla-pro thead th.sortable:hover .sort-indicator {
    opacity: 0.6;
}

/* Active Ascending State: Single Up Arrow, solid white */
.tabla-pro thead th[aria-sort="ascending"] .sort-indicator {
    opacity: 1 !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23ffffff" viewBox="0 0 16 16"><path d="m7.247 4.86-4.796 5.481c-.566.647-.106 1.659.753 1.659h9.592a1 1 0 0 0 .753-1.659l-4.796-5.48a1 1 0 0 0-1.506 0z"/></svg>');
}

/* Active Descending State: Single Down Arrow, solid white */
.tabla-pro thead th[aria-sort="descending"] .sort-indicator {
    opacity: 1 !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23ffffff" viewBox="0 0 16 16"><path d="M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z"/></svg>');
}

/* Hide QuickGrid's default visual options button space */
.tabla-pro thead th .col-options-button {
    display: none !important;
}


/* PAGINATION CONTAINER */
/* Ensure flex container spans across and aligns properly */
.pagination-container {
    padding: 1rem 0 0.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Discreet summary text bottom left */
.pagination-summary {
    font-size: 0.85rem;
    color: #8c98a4; /* Discreet gray */
    font-weight: 400;
}

/* Custom styled pagination buttons right side */
.custom-pagination {
    gap: 0; /* Remove gap so borders touch */
}

.custom-pagination .page-item .page-link {
    border: 1px solid #dee2e6;
    color: #6c757d;
    background-color: #f8f9fa; /* Light gray */
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    box-shadow: none;
    margin: 0; /* Override margin */
    transition: background-color 0.2s, color 0.2s;
}

/* Rounding corners on first and last */
.custom-pagination .page-item:first-child .page-link {
    border-top-left-radius: 0.4rem !important;
    border-bottom-left-radius: 0.4rem !important;
}
.custom-pagination .page-item:last-child .page-link {
    border-top-right-radius: 0.4rem !important;
    border-bottom-right-radius: 0.4rem !important;
}

/* Hover state */
.custom-pagination .page-item:not(.disabled):not(.active) .page-link:hover {
    background-color: #e9ecef;
    color: #495057;
}

/* Active State (The page number in the middle) */
.custom-pagination .page-item.active .page-link {
    background-color: #0062A1 !important; /* var(--color-predominante) */
    border-color: #0062A1 !important;
    color: #ffffff;
    font-weight: 600;
}

/* Disabled State */
.custom-pagination .page-item.disabled .page-link {
    background-color: #e9ecef;
    color: #adb5bd;
}

.tituloCard {
    color: var(--color-predominante);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

/* TIMELINE STYLES */
.timeline-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    padding: 0 1rem;
    margin-bottom: 2rem;
}

.timeline-line {
    position: absolute;
    top: 1.25rem; /* Exactly the center of the 2.5rem timeline-circle */
    left: 2rem;
    right: 2rem;
    height: 4px;
    background-color: var(--color-predominante);
    z-index: 0;
    transform: translateY(-50%);
}

.timeline-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.timeline-step.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.timeline-circle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: var(--fondo-contenedor);
    border: 3px solid var(--color-borde-inputs);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: var(--color-labels);
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

.timeline-step.active .timeline-circle {
    border-color: var(--color-predominante);
    background-color: var(--color-predominante);
    color: white;
}

.timeline-step.active .timeline-circle img {
    display: block;
    width: 1.5rem;
    height: 1.5rem;
    object-fit: contain;
}

.timeline-step:not(.active) .timeline-circle img {
    display: none;
}

.timeline-step.completed .timeline-circle {
    border-color: var(--color-predominante);
    background-color: var(--color-predominante);
    color: white;
}

.timeline-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-labels);
    text-align: center;
}

.timeline-step.active .timeline-label {
    color: var(--color-predominante);
}

.timeline-step.completed .timeline-label {
    color: var(--color-predominante);
}
