.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#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."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: rgba(85, 40, 99, .12);
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #FC6821;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    color: #552863;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Cargando");
    }

code {
    color: #c02d76;
}

body {
    font-family: 'Segoe UI', 'Helvetica Neue', 'Trebuchet MS', Verdana, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    /* Forzar scrollbar para mantener simetría y padding uniforme */
}

#main-header {
    background-color: #fff;
    padding: 0 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    height: 50px;
}

.main-content {
    padding: 15px;
    
    /* Added padding for footer */
}

.container {
    min-width: calc(100vw - 40px);
    margin: auto;
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h1 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.header-title {
    margin: 0;
    font-size: 1.2em;
    font-weight: 500;
    border: none;
}

/* ESTILO TÍTULO DE SECCIÓN (Simula dxForm group caption) */
.form-group-caption {
    font-size: 1.15em;
    /* Ligeramente más grande que el texto normal */
    font-weight: 500;
    /* Semi-negrita */
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ddd;
    /* Línea separadora */
}

/* --- Layout Maestro-Detalle --- */
.main-layout {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.employee-list-container {
    flex: 1;
    min-width: 300px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background-color: #fdfdfd;
}

.detail-form-container {
    flex: 2;
    min-width: 0;
}

/* --- Fin Layout --- */

.async-section-container {
    position: relative;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    background-color: #fafafa;
    margin-bottom: 25px;
    transition: background-color 0.3s, border-color 0.3s;
}

/* Contenedor para la nueva sección de solo lectura */
.read-only-section {
    padding: 20px;
    /* Ajustado para alinear con los otros */
    background-color: #fafafa;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #ddd;
}

.async-section-container.section-invalid {
    border-color: #d9534f;
    background-color: #fdf7f7;
}

    .async-section-container.section-invalid .form-group-caption {
        color: #a94442;
    }

.load-panel {
    position: absolute;
}

.error-actions {
    display: none;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eecfcf;
    text-align: right;
}

.discard-button {
    margin-right: 10px;
}

/* --- ANIMACIÓN DE ÉXITO --- */
.success-animation-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.7);
    opacity: 0;
    visibility: hidden;
    /* AJUSTE: Lee la variable CSS --anim-fade */
    transition: opacity var(--anim-fade), visibility var(--anim-fade);
    z-index: 10;
    pointer-events: none;
}

    .success-animation-container.animate {
        opacity: 1;
        visibility: visible;
        pointer-events: all;
    }

.animated-check {
    width: 100px;
    height: 100px;
}

/* Estilos base para ambas líneas */
.check-path-1,
.check-path-2 {
    stroke: #4CAF50;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Línea 1: Duración */
.check-path-1 {
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    /* AJUSTE: Lee la variable CSS --anim-line1-draw */
    animation: draw-check-1 var(--anim-line1-draw) ease-in forwards;
}

/* Línea 2: Duración y Delay */
.check-path-2 {
    stroke-dasharray: 60;
    stroke-dashoffset: 60;
    /* AJUSTE: Lee las variables CSS --anim-line2-draw y --anim-line2-delay */
    animation: draw-check-2 var(--anim-line2-draw) ease-in var(--anim-line2-delay) forwards;
}

/* Ocultar las líneas hasta que se active la animación */
.success-animation-container:not(.animate) .check-path-1,
.success-animation-container:not(.animate) .check-path-2 {
    animation: none;
}


@keyframes draw-check-1 {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes draw-check-2 {
    to {
        stroke-dashoffset: 0;
    }
}

/* --- FIN ANIMACIÓN ÉXITO --- */

.dx-list-item-content {
    font-size: 14px;
}

.dx-list-item-selected {
    background-color: #e0eefd !important;
    color: #337ab7 !important;
}

/* Estilo para el TagBox agrupado */
.dx-tagbox-grouped .dx-list-group-header {
    background-color: #f5f5ff;
    /* Un poco más azulado */
    font-weight: bold;
    color: #333;
    padding: 8px 12px;
}

/* Estilo para los items del TagBox */
.dx-tagbox-grouped .dx-list-item-content {
    padding-left: 15px;
    /* Indentación */
}

/* --- NUEVOS ESTILOS PARA LA LISTA DE ASIGNADOS --- */
#assigned-sublevels-list {
    max-height: 150px;
    /* Scroll si es muy larga */
    overflow-y: auto;
    background-color: #fdfdfd;
    border: 1px dashed #eee;
    /* Borde sutil */
    border-radius: 4px;
    padding: 5px;
}

    #assigned-sublevels-list .dx-list-item-content {
        padding: 8px 10px;
        font-size: 13px;
    }

.dx-list-empty-message {
    font-style: italic;
    color: #888;
    padding: 10px;
}

/* --- FIN NUEVOS ESTILOS --- */



/* Estilos personalizados y para la API de Google Maps */

#map {
    height: 100%;
    width: 100%;
}

/* Estilos para los botones flotantes sobre el mapa */
.map-btn {
    position: absolute; /* Clave para el posicionamiento dentro del contenedor relative */
    z-index: 10; /* Asegura que estén por encima del mapa */
    width: 40px;
    height: 40px;
    padding: 0;
    line-height: 40px;
    text-align: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
    cursor: pointer;
}

.map-btn-top-right-1 {
    top: 10px;
    right: 10px;
}


.map-btn-top-right-2 {
    top: 60px; /* Posicionado debajo del botón 1 */
    right: 10px;
}

/* Clases para resaltar la selección */
.selected-geofence {
    background-color: #e0f2fe; /* light-blue-100 */
    border-left-width: 4px;
    border-color: #0ea5e9; /* sky-500 */
}
/* Estilo para el nuevo marcador de ubicación avanzada */
.location-marker {
    width: 18px;
    height: 18px;
    border: 2px solid white;
    border-radius: 50%;
    background-color: #4285F4;
    box-shadow: 0 2px 4px rgba(0,0,0,0.4);
    transform: translate(-50%, -50%); /* Centrar el marcador */
}
/* Estilo para la etiqueta de la geocerca sobre el mapa */
.geofence-label {
    background-color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    transform: translate(-50%, -150%); /* Posiciona la etiqueta arriba del punto central */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
/* Estilo para el cursor en modo de prueba */
.test-mode-cursor {
    cursor: crosshair !important;
}

.content-grid {
    height: calc(100vh - var(--grid-offset, 200px));
}

    .content-grid .dxbl-grid {
        flex: 1 1 auto; 
        height: 100% !important; 
    }

.content-grid-selected {
    height: calc(100vh - 490px);
}

    .content-grid-selected .dxbl-grid {
        flex: 1 1 auto;
        height: 100% !important;
    }

/*Estilos para foto del empleado*/
.photo-container {
    width: 20%;
    aspect-ratio: 3 / 4;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.photo-camera-button {
    position: absolute !important;
    right: 8px;
    bottom: 8px;
    z-index: 10;
    width: 38px;
    height: 38px;
    border-radius: 50% !important;
    padding: 0 !important;
}

.photo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.photo-general-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    background-color: #f1f1f1;
    align-items: center;
    justify-content: center;
    color: black;
    font-size: 14px;
}

.listbox-item-template {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem; /* espacio entre la foto y el nombre */
}

    .listbox-item-template > img,
    .photo-placeholder {
        align-items: center;
        border-radius: 10%;
        width: 1.8rem;
        height: 1.8rem;
        flex-shrink: 0;
        font-size: 8px;
        background-color: #f1f1f1;
        display: flex;
        justify-content: center;
    }
/*Fin Estilos para foto del empleado*/

.iconBack {
    margin-inline-end: 1.5%;
    cursor: pointer;
}


/* Calendario */
.dxbl-calendar-day > a {
    text-decoration: none;
}

.allowed-day {
    font-weight: 450 !important;
    color: black;
}

.not-allowed-day {
    font-weight: 600 !important;
    color: var(--dxbl-client-component-palette-danger) !important;
}

.holiday {
    font-weight: 600 !important;
    color: var(--mycolor);
}

.holiday-maintenance {
    font-weight: 600 !important;
    color: var(--mycolor);
}

/* Descripcion colores */
.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid #ccc;
}

    .legend-color.allowed-day {
        background-color: var(--mycolor);
    }

    .legend-color.not-allowed-day {
        background-color: var(--mycolor);
    }

    .legend-color.holiday {
        background-color: var(--mycolor);
    }

    .legend-color.holiday-maintenance {
        background-color: var(--mycolor);
    }

    .rest-day-swap-main {
        display: flex;
        gap: 24px;
        align-items: flex-start; /* la lista de la izquierda queda hasta arriba */
        flex-wrap: wrap;
    }

    /* Izquierda: colaboradores */
    .rest-day-swap-left {
        flex: 0 0 38%;
        min-width: 280px;
    }

    /* Derecha: calendarios */
    .rest-day-swap-right {
        flex: 1 1 0;
        min-width: 320px;
    }

    .rest-day-swap-grid {
        max-height: 260px;
    }

    /* Responsive */
    @media (max-width: 992px) {
        .rest-day-swap-main {
            flex-direction: column;
        }

        .rest-day-swap-left,
        .rest-day-swap-right {
            flex: 1 1 100%;
        }
    }

    .restday-list-layout {
        max-width: 1200px;
        margin: 0 auto;
        padding: 16px 8px 32px;
    }

    .restday-card {
        border-radius: 10px;
        box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    }

    /* contenedor filtros arriba */
    .restday-filters {
        display: flex;
        gap: 24px;
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .restday-filters-left {
        flex: 0 0 55%;
        min-width: 320px;
    }

    .restday-filters-right {
        flex: 1 1 0;
        min-width: 260px;
    }

    /* responsive: columnas en stack */
    @media (max-width: 992px) {
        .restday-filters {
            flex-direction: column;
        }

        .restday-filters-left,
        .restday-filters-right {
            flex: 1 1 100%;
        }
    }

/*Footer*/
.main-footer {
    position: fixed;
    font-weight: 550;
    left: 0;
    bottom: 0;
    width: 100%;
    background-color: #fff;
    z-index: 2;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    border-top: 1px solid #e0e0e0;
    padding: 10px;
}

.reports-page {
    height: calc(100vh - 80px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.report-filter-card {
    flex: 0 0 auto;
}

.report-result-card {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

#attendancePivotGrid {
    height: 100%;
}

.picture-upload-modal {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 10px 6px 4px;
}

.picture-preview-wrapper {
    text-align: center;
}

.picture-preview-title {
    margin-top: 12px;
    font-weight: 600;
    font-size: 16px;
}

.picture-preview-subtitle {
    font-size: 13px;
    color: #777;
    margin-top: 4px;
}

.picture-upload-box {
    border: 2px dashed #cfcfcf;
    border-radius: 14px;
    padding: 18px;
    text-align: center;
    cursor: pointer;
    transition: all .2s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

    .picture-upload-box:hover {
        border-color: #0d6efd;
        background: #f7fbff;
    }

    .picture-upload-box i {
        font-size: 28px;
        color: #0d6efd;
    }

.picture-file-input {
    display: none;
}

.picture-file-name {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.picture-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}