﻿html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

.spix-calendar {
    height: calc(100vh - 260px);
    background: #ffffff;
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

/* FullCalendar visual tuning */
.fc {
    font-family: 'Segoe UI', sans-serif;
}

    .fc .fc-toolbar-title {
        font-size: 1.4rem;
        font-weight: 600;
        color: #333;
    }

    .fc .fc-button {
        background: #4285F4;
        border: none;
        border-radius: 4px;
        padding: 6px 12px;
        color: white;
    }

        .fc .fc-button:hover {
            background: #3367D6;
        }

        .fc .fc-button.fc-button-active {
            background: #0F9D58;
        }

    .fc .fc-daygrid-day {
        border: 1px solid #e6e6e6;
    }

    .fc .fc-daygrid-day-number {
        font-weight: 600;
        color: #444;
    }

    .fc .fc-daygrid-event {
        border-radius: 4px;
        padding: 2px 4px;
    }

        .fc .fc-daygrid-event:hover {
            filter: brightness(1.15);
            cursor: pointer;
        }

.btn-bor {
    border-radius: 15px;
    text-align: center;
    font-weight: bold;
    box-shadow: 5px 10px 8px #888888;
}

.btn-mini {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Fondo inicial */
    background-color: #ffffff;
    color: #000;
    /* Borde estilo Bootstrap */
    border: 1px solid #ced4da;
    /* SOMBRA flotante estilo tu botón original */
    box-shadow: 4px 6px 10px rgba(0,0,0,0.55);
    /* Transición estilo btn-dark */
    transition: background-color .25s ease, color .25s ease, transform .15s ease;
    padding: 0;
}

    /* Hover: blanco → negro */
    .btn-mini:hover {
        background-color: #000;
        color: #fff;
        transform: translateY(-2px); /* levita */
    }

    /* Active: más oscuro y baja */
    .btn-mini:active {
        background-color: #333;
        color: #fff;
        transform: translateY(0);
    }

.btn-mini-danger {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    color: #dc3545;
    border: 1px solid #ced4da;
    box-shadow: 4px 6px 10px rgba(0,0,0,0.55);
    transition: background-color .25s ease, color .25s ease, transform .15s ease;
    padding: 0;
}

    .btn-mini-danger:hover {
        background-color: #dc3545;
        color: #fff;
        transform: translateY(-2px);
    }

    .btn-mini-danger:active {
        background-color: #b02a37;
        color: #fff;
        transform: translateY(0);
    }

.btn-mini-success {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    color: #198754;
    border: 1px solid #ced4da;
    box-shadow: 4px 6px 10px rgba(0,0,0,0.55);
    transition: background-color .25s ease, color .25s ease, transform .15s ease;
    padding: 0;
}

    .btn-mini-success:hover {
        background-color: #198754;
        color: #fff;
        transform: translateY(-2px);
    }

    .btn-mini-success:active {
        background-color: #146c43;
        color: #fff;
        transform: translateY(0);
    }



.modal-content {
    animation: modalFadeIn 0.18s ease-out;
}

@keyframes modalFadeIn {
    from {
        transform: scale(0.97);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}
.modal-create-shadow {
    box-shadow: 0 8px 28px rgba(0,0,0,0.25);
    border-radius: 10px;
}

/* Para que los Switches pasen a Verde cuando esten activos */
.form-switch .form-check-input:checked {
    background-color: #28a745;
    border-color: #28a745;
}

/* sobre poner el spinner en los modales */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.6); /* semitransparente */
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

/* Para Checkbox se puedan ver */
.form-check-input {
    box-shadow: 3px 5px 10px rgba(0, 0, 0, 0.4); /* sombra más profunda y amplia */
    outline: none;
    border: 1px solid #ced4da;
    border-radius: 4px;
}

/* Boton X para cerrar los Modal */
.btn-close-modal {
    position: absolute;
    top: 12px;
    right: 12px;
    background-color: #212529; /* negro elegante */
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
    transition: background-color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

    .btn-close-modal:hover {
        background-color: #000000;
        transform: scale(1.1);
    }

    .btn-close-modal:active {
        background-color: #121212;
        transform: scale(0.95);
    }

    .btn-close-modal i {
        color: white;
    }

/* Boton Danger para Index */
.btn-shadow-danger {
    background-color: #dc3545; /* rojo Bootstrap */
    color: white !important;
    font-size: 0.875rem; /* btn-sm */
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: 0.25rem;
    box-shadow: 2px 4px 6px rgba(0, 0, 0, 0.6);
    transition: all 0.2s ease;
}

    .btn-shadow-danger:hover {
        background-color: #bb2d3b; /* rojo más profundo al hover */
        box-shadow: 3px 5px 8px rgba(0, 0, 0, 0.7);
        transform: scale(1.02);
        color: white !important;
    }

    .btn-shadow-danger:active {
        background-color: #a12631; /* aún más profundo al click */
        transform: scale(0.97);
        box-shadow: 1px 3px 5px rgba(0, 0, 0, 0.5);
        color: white !important;
    }

    /* Forzar el ícono blanco */
    .btn-shadow-danger i {
        color: white !important;
    }

/* Boton Black para Index */
.btn-shadowText-black {
    background-color: #212529; /* negro Bootstrap */
    color: white !important;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: 0.25rem;
    box-shadow: 2px 4px 6px rgba(0, 0, 0, 0.6);
    transition: all 0.2s ease;
    min-width: 70px;
}

.btn-shadow-black:hover {
    background-color: #000000; /* negro intenso al hover */
    box-shadow: 3px 5px 8px rgba(0, 0, 0, 0.7);
    transform: scale(1.02);
    color: white !important;
}

.btn-shadow-black:active {
    background-color: #121212; /* negro profundo al click */
    transform: scale(0.97);
    box-shadow: 1px 3px 5px rgba(0, 0, 0, 0.5);
    color: white !important;
}

.btn-shadow-black i {
    color: white !important;
}

/* Boton Black para Index */
.btn-shadow-black {
    background-color: #212529; /* negro Bootstrap */
    color: white !important;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: 0.25rem;
    box-shadow: 2px 4px 6px rgba(0, 0, 0, 0.6);
    transition: all 0.2s ease;
}

    .btn-shadow-black:hover {
        background-color: #000000; /* negro intenso al hover */
        box-shadow: 3px 5px 8px rgba(0, 0, 0, 0.7);
        transform: scale(1.02);
        color: white !important;
    }

    .btn-shadow-black:active {
        background-color: #121212; /* negro profundo al click */
        transform: scale(0.97);
        box-shadow: 1px 3px 5px rgba(0, 0, 0, 0.5);
        color: white !important;
    }

    .btn-shadow-black i {
        color: white !important;
    }

/* Boton Warning para Index */
.btn-shadow-warning {
    background-color: #ffc107; /* amarillo Bootstrap */
    color: white !important;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: 0.25rem;
    box-shadow: 2px 4px 6px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

    .btn-shadow-warning:hover {
        background-color: #e0a800; /* dorado intenso */
        box-shadow: 3px 5px 8px rgba(0, 0, 0, 0.5);
        transform: scale(1.02);
        color: white !important;
    }

    .btn-shadow-warning:active {
        background-color: #b8860b; /* dorado profundo al click */
        transform: scale(0.97);
        box-shadow: 1px 3px 5px rgba(0, 0, 0, 0.3);
        color: white !important;
    }

    .btn-shadow-warning i {
        color: white !important;
    }

/* Fondo gris muy suave para el área principal */
.main-content {
    background:
        radial-gradient(1000px 600px at 80% -10%, rgba(43, 139, 255, .5), transparent 60%),
        radial-gradient(750px 520px at 0% 25%, rgba(34, 193, 232, .24), transparent 55%),
        linear-gradient(160deg, rgba(8, 26, 63, .92), rgba(16, 54, 120, .88) 55%, rgba(11, 35, 80, .9)),
        url('https://spiximage.blob.core.windows.net/imgwwwroot/bgCenterImg.jpg?v=20260708-3');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    padding: 2rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    min-height: 100vh; /* ocupa al menos toda la altura de la ventana */
    box-sizing: border-box; /* asegura que el padding no agregue overflow */
}

/* Primary */
.btn-gradient-primary {
    background: linear-gradient(to right, #6f42c1, #0d6efd);
    border: none;
    color: white !important;
    transition: all 0.3s ease;
    box-shadow: 3px 5px 8px rgba(0, 0, 0, 0.7);
}

    .btn-gradient-primary:hover {
        background: linear-gradient(to right, #4b2b89, #0a53be);
        box-shadow: 2px 4px 6px rgba(0, 0, 0, 0.6);
        transform: scale(1.02);
    }

/* Secondary */
.btn-gradient-secondary {
    background: linear-gradient(to right, #6c757d, #adb5bd);
    border: none;
    color: white !important;
    transition: all 0.3s ease;
    box-shadow: 3px 5px 8px rgba(0, 0, 0, 0.7);
}

    .btn-gradient-secondary:hover {
        background: linear-gradient(to right, #545b62, #9099a1);
        box-shadow: 2px 4px 6px rgba(0, 0, 0, 0.6);
        transform: scale(1.02);
    }

/* Success */
.btn-gradient-success {
    background: linear-gradient(to right, #198754, #51d88a);
    border: none;
    color: white !important;
    transition: all 0.3s ease;
    box-shadow: 3px 5px 8px rgba(0, 0, 0, 0.7);
}

    .btn-gradient-success:hover {
        background: linear-gradient(to right, #146c44, #3fba72);
        box-shadow: 2px 4px 6px rgba(0, 0, 0, 0.6);
        transform: scale(1.02);
    }

/* Danger */
.btn-gradient-danger {
    background: linear-gradient(to right, #ff1e1e, #ffd1d1);
    border: none;
    color: white !important;
    transition: all 0.3s ease;
    box-shadow: 3px 5px 8px rgba(0, 0, 0, 0.7);
}

    .btn-gradient-danger:hover {
        background: linear-gradient(to right, #e60000, #ffaaaa);
        box-shadow: 2px 4px 6px rgba(0, 0, 0, 0.6);
        transform: scale(1.03);
    }

/* Warning */
.btn-gradient-warning {
    background: linear-gradient(to right, #ffc107, #ffdd57);
    border: none;
    color: white !important;
    transition: all 0.3s ease;
    box-shadow: 3px 5px 8px rgba(0, 0, 0, 0.7);
}

    .btn-gradient-warning:hover {
        background: linear-gradient(to right, #e6b106, #ffd13f);
        box-shadow: 2px 4px 6px rgba(0, 0, 0, 0.6);
        transform: scale(1.02);
    }

/* Info */
.btn-gradient-info {
    background: linear-gradient(to right, #0dcaf0, #3dd5f3);
    border: none;
    color: white !important;
    transition: all 0.3s ease;
    box-shadow: 3px 5px 8px rgba(0, 0, 0, 0.7);
}

    .btn-gradient-info:hover {
        background: linear-gradient(to right, #0aa1c0, #2bb9d9);
        box-shadow: 2px 4px 6px rgba(0, 0, 0, 0.6);
        transform: scale(1.02);
    }

/* Black */
.btn-gradient-black {
    background: linear-gradient(to right, #212529, #6c757d);
    border: none;
    color: white !important;
    transition: all 0.3s ease;
    box-shadow: 3px 5px 8px rgba(0, 0, 0, 0.7);
}

    .btn-gradient-black:hover {
        background: linear-gradient(to right, #000000, #495057);
        box-shadow: 2px 4px 6px rgba(0, 0, 0, 0.6);
        transform: scale(1.03);
    }

.btn-gradient-primary,
.btn-gradient-secondary,
.btn-gradient-success,
.btn-gradient-danger,
.btn-gradient-warning,
.btn-gradient-info,
.btn-gradient-black {
    box-shadow: 4px 6px 14px rgba(0, 0, 0, 0.5); /* sombra más profunda */
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    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: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            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;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.table-dark {
    --bs-table-color: #ffffff;
    --bs-table-bg: #0e2a5e;
    --bs-table-border-color: #173f82;
    --bs-table-striped-bg: #12346d;
    --bs-table-hover-bg: #173f82;
}

/* Standard nested card used inside a parent surface. */
.card-floating-section {
    border: 1px solid rgba(45, 91, 160, .45);
    border-radius: 12px;
    box-shadow: 5px 6px 0 rgba(44, 95, 173, .24);
    overflow: hidden;
}

.card-floating-section .card-body {
    background: linear-gradient(135deg, #ffffff 0%, #f6f9ff 100%);
}

.route-not-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 580px;
    margin: 4rem auto;
    padding: 3rem 2rem;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 16px;
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 18px 38px rgba(14, 42, 94, .16), 0 4px 10px rgba(14, 42, 94, .1);
    backdrop-filter: blur(8px);
    text-align: center;
}

.route-not-found__icon {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin-bottom: .75rem;
    border-radius: 20px;
    background: #0e2a5e;
    color: #ffffff;
    font-size: 2rem;
}

.route-not-found__code {
    color: #0e7c86;
    font-size: .9rem;
    font-weight: 800;
    letter-spacing: .12em;
}

.route-not-found h1 {
    margin: .35rem 0 .75rem;
    color: #0e2a5e;
    font-size: 1.8rem;
    font-weight: 800;
}

.route-not-found p {
    max-width: 430px;
    margin-bottom: 1.5rem;
    color: #496174;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Encabezado estándar para todas las tablas de índices y detalles. */
.table-dark {
    --bs-table-color: #ffffff;
    --bs-table-bg: #0e2a5e;
    --bs-table-border-color: #1b4a92;
    --bs-table-striped-bg: #0e2a5e;
    --bs-table-striped-color: #ffffff;
    --bs-table-hover-bg: #12366f;
    --bs-table-hover-color: #ffffff;
}

/* ================================================================
   ACORDEON DE DOS NIVELES  (categoria -> hijos)  -- DISENO POR DEFECTO
   ----------------------------------------------------------------
   Estilo unico para todas las pantallas de acordeon. Hoy lo usan
   ProductCategory, Mark/MarkModel, ServiceCategory y PlanCategory.
   Para llevarlo a otro proyecto se copia este bloque completo.

   No poner estilos de acordeon en el .razor.css de cada pagina: se
   duplican y las pantallas terminan distintas entre si.

   Markup canonico (copiar tal cual al crear una pantalla nueva):

   <table class="table align-middle acc-table">
     <thead class="table-dark"> ... </thead>
     <tbody>
       <tr class="acc-row @(abierta ? "is-open" : null)">
         <td class="acc-toggle" @onclick="...">
           <button class="acc-disc" type="button"><i class="fa fa-chevron-right"></i></button>
         </td>
         <td><span class="acc-name">Nombre</span></td>
         <td><span class="acc-count @(n == 0 ? "is-zero" : null)">@n</span></td>
         <td><span class="acc-pill @(activo ? "is-on" : "is-off")">Activo</span></td>
         <td><div class="acc-actions"> ButtonEdit / ButtonDelete </div></td>
       </tr>

       <tr class="acc-expanded">
         <td colspan="5">
           <section class="acc-panel">
             <div class="acc-card card-floating-section">   <-- las DOS clases
               <div class="acc-card-bar"> boton "nuevo hijo" </div>
               <table class="acc-list"> ... </table>
               <!-- o, si no hay hijos: -->
               <div class="acc-empty">
                 <span class="acc-empty-glyph"><i class="fa fa-..."></i></span>
                 <strong>@Localizer["NoRecordsFound"]</strong>
                 <span>@Localizer[nameof(Resource.Accordion_EmptyHint)]</span>
               </div>
             </div>
           </section>
         </td>
       </tr>
     </tbody>
   </table>

   Reglas del patron:
   - El estado NUNCA es un checkbox deshabilitado: va en .acc-pill.
   - El contador de hijos va en .acc-count (gris con .is-zero).
   - El boton de "nuevo hijo" vive dentro de .acc-card-bar, no flotando.
   - Las acciones solo se alinean con .acc-actions: la forma la ponen
     los componentes Shared (.btn-mini / .btn-mini-danger).
   - Cifras que se comparan: .acc-num (+ .is-low / .is-none).
   ================================================================ */

/* --- Fila padre --- */
.acc-table > tbody > tr.acc-row > td {
    border-bottom: 1px solid #eef1f5;
    padding: .85rem 1rem;
    transition: background .15s ease;
}

.acc-table > tbody > tr.acc-row.is-open > td {
    background: #f5f8ff;
    border-bottom-color: transparent;
}

.acc-table > tbody > tr.acc-row.is-open > td:first-child {
    box-shadow: inset 3px 0 0 #3b3fd8;
}

.acc-table > tbody > tr.acc-row:hover > td {
    background: #fafbfe;
}

.acc-table > tbody > tr.acc-row.is-open:hover > td {
    background: #f5f8ff;
}

/* --- Disco que abre y cierra --- */
.acc-toggle {
    cursor: pointer;
    width: 3rem;
}

.acc-disc {
    align-items: center;
    background: #fff;
    border: 1px solid #d7dde7;
    border-radius: 50%;
    color: #41506b;
    display: inline-flex;
    font-size: .7rem;
    height: 2rem;
    justify-content: center;
    padding: 0;
    transition: transform .18s ease, background .18s ease, color .18s ease;
    width: 2rem;
}

.acc-row.is-open .acc-disc {
    background: #3b3fd8;
    border-color: #3b3fd8;
    color: #fff;
    transform: rotate(90deg);
}

/* --- Nombre de la categoria --- */
.acc-name {
    color: #152238;
    font-weight: 600;
}

.acc-sub {
    color: #7c8798;
    display: block;
    font-size: .78rem;
    font-weight: 400;
}

/* --- Conteo de hijos --- */
.acc-count {
    align-items: center;
    background: #eef1f8;
    border-radius: 999px;
    color: #33405a;
    display: inline-flex;
    font-size: .82rem;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    padding: .15rem .6rem;
}

.acc-count.is-zero {
    background: #f4f5f7;
    color: #8b95a5;
}

/* --- Estado (reemplaza al checkbox deshabilitado) --- */
.acc-pill {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    font-size: .78rem;
    font-weight: 600;
    gap: .4rem;
    padding: .15rem .65rem;
}

.acc-pill::before {
    background: currentColor;
    border-radius: 50%;
    content: "";
    height: .45rem;
    width: .45rem;
}

.acc-pill.is-on {
    background: #e7f5ee;
    color: #116b45;
}

.acc-pill.is-off {
    background: #f1f2f4;
    color: #79828f;
}

/* --- Acciones ---
   Solo se acomodan en fila. La forma la ponen los propios componentes Shared
   (.btn-mini y .btn-mini-danger ya son redondos de 30px): pisarlos desde aqui
   los dejaba distintos entre si. */
.acc-actions {
    align-items: center;
    display: flex;
    gap: .4rem;
    justify-content: flex-end;
}

/* --- Panel desplegado --- */
.acc-table > tbody > tr.acc-expanded > td {
    background: #f5f8ff;
    padding: 0;
}

.acc-panel {
    padding: 0 1rem 1.15rem;
}

/* El borde, el radio y el sombreado azul los pone .card-floating-section,
   el mismo estilo de "card dentro de card" que usa el resto del sistema. */
.acc-card {
    background: linear-gradient(135deg, #ffffff 0%, #f6f9ff 100%);
    overflow: hidden;
}

.acc-card-bar {
    align-items: center;
    border-bottom: 1px solid #dfe8f5;
    display: flex;
    gap: .875rem;
    justify-content: flex-start;
    padding: .7rem .95rem;
}

.acc-card-title {
    color: #41506b;
    font-size: .83rem;
    font-weight: 600;
    letter-spacing: .02em;
    margin: 0;
    text-transform: uppercase;
}

/* --- Tabla de hijos --- */
.acc-list {
    border-collapse: collapse;
    font-size: .9rem;
    margin: 0;
    width: 100%;
}

.acc-list th {
    background: #16305e;
    color: #fff;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .08em;
    padding: .6rem .95rem;
    text-align: left;
    text-transform: uppercase;
}

.acc-list td {
    border-bottom: 1px solid #f2f5f9;
    padding: .6rem .95rem;
    vertical-align: middle;
}

.acc-list tr:last-child td {
    border-bottom: 0;
}

/* Zebra: fila blanca / fila gris azulada muy suave.
   Va ANTES del hover para que el hover gane (misma especificidad, manda el orden). */
.acc-list tbody tr:nth-child(odd) td {
    background: #ffffff;
}

.acc-list tbody tr:nth-child(even) td {
    background: #e9f0fb;
}

.acc-list tbody tr:hover td {
    background: #dae5f7;
}

.acc-item-name {
    color: #152238;
    font-weight: 500;
}

.acc-item-meta {
    color: #8b95a5;
    font-size: .76rem;
}

/* --- Numeros: el inventario critico salta a la vista --- */
.acc-num {
    color: #152238;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.acc-num.is-low {
    color: #8a5a06;
}

.acc-num.is-none {
    color: #a52218;
}

.acc-chip {
    background: #eef1f8;
    border-radius: .35rem;
    color: #41506b;
    display: inline-block;
    font-size: .74rem;
    font-weight: 600;
    padding: .1rem .45rem;
}

.acc-chip.is-muted {
    background: #f4f5f7;
    color: #9aa3b0;
}

.acc-center {
    text-align: center;
}

/* --- Estado vacio: dice que falta y ofrece la accion --- */
.acc-empty {
    align-items: center;
    color: #8b95a5;
    display: flex;
    flex-direction: column;
    gap: .55rem;
    padding: 1.9rem 1rem;
    text-align: center;
}

.acc-empty-glyph {
    align-items: center;
    background: #f1f4fa;
    border-radius: 50%;
    color: #9aa8c2;
    display: flex;
    font-size: 1rem;
    height: 2.6rem;
    justify-content: center;
    width: 2.6rem;
}

.acc-empty strong {
    color: #41506b;
    font-size: .92rem;
    font-weight: 600;
}

.acc-empty span {
    font-size: .83rem;
}

@media (max-width: 768px) {
    .acc-panel {
        padding: 0 .5rem 1rem;
    }

    .acc-card-bar {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .acc-disc,
    .acc-table > tbody > tr.acc-row > td {
        transition: none;
    }
}

/* ================================================================
   ZEBRA ESTANDAR DE TODAS LAS TABLAS DE INDICE
   Mismo gris azulado del acordeon, para que las listas del sistema
   se vean iguales vengan de donde vengan. Bootstrap pinta la zebra
   con variables, asi que basta redefinirlas una vez aqui.
   No afecta al <thead class="table-dark">: ese trae sus propias
   variables mas arriba en este archivo.
   ================================================================ */
.table-striped {
    --bs-table-striped-bg: #e9f0fb;
    --bs-table-striped-color: inherit;
}

.table-hover {
    --bs-table-hover-bg: #dae5f7;
    --bs-table-hover-color: inherit;
}

/* Pantalla "Autorizando": reutiliza el splash de index.html (sus estilos criticos viven
   en el <head>) y la fija a pantalla completa para que no quede dentro del layout. */
.spix-authorizing-screen {
    position: fixed !important;
    inset: 0;
    z-index: 2000;
    width: 100vw;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ================================================================
   CAPA UNICA DE MODALES (ModalService) - replicada de Rentx
   Todos los modales se montan en <ModalHost> al final de los layouts, FUERA de la pagina.
   La capa cubre TODA la pantalla por encima del sidebar (3500), la barra superior (3000)
   y el desplegable de Setting (5000): oscurece el fondo y bloquea cualquier clic detras.
   ================================================================ */
.spix-modal-host {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: block;
    background-color: rgba(3, 14, 39, .68);
    backdrop-filter: blur(4px) saturate(.72);
    -webkit-backdrop-filter: blur(4px) saturate(.72);
}

/* Cada modal trae su propio fondo y z-index en linea: dentro de la capa se anulan para no
   oscurecer dos veces, y el modal se centra sobre toda la pantalla. */
.spix-modal-host .modal {
    inset: 0 !important;
    width: 100% !important;
    z-index: 1 !important;
    background-color: transparent !important;
}

.spix-modal-host .modal-backdrop {
    display: none;
}

/* SweetAlert se abre DESPUES del modal (confirmar, exito, error): debe quedar por encima de la capa. */
.swal2-container {
    z-index: 11000 !important;
}

/* La barra de error de Blazor ("Reload") debe verse aunque haya un modal abierto. */
#blazor-error-ui {
    z-index: 12000;
}

/* ================================================================
   INDEX PRO  (clases .idx-*)
   Aspecto comun de las pantallas de listado: panel con cabecera azul,
   barra de herramientas, tabla con zebra y pie con la paginacion.
   Vive aqui y no en cada .razor.css para que se corrija en un solo lugar.
   Los mismos tonos del maestro-detalle (Marcas, Productos, Planes, Servicios).

   Estructura:
   <div class="card shadow-lg p-4" style="border-radius:12px">
     <h3 class="idx-title">Titulo</h3>
     <p class="idx-sub">Descripcion corta</p>
     <section class="idx-panel">
       <header class="idx-panel-head"> <b><i class="fa fa-x"></i>Titulo</b> <div class="idx-head-tools">botones</div> </header>
       <div class="idx-toolbar"> <div class="idx-search">buscador</div> </div>
       <div class="table-responsive">
         <table class="idx-table"> ... </table>
       </div>
       <div class="idx-panel-foot"> <Pagination /> </div>
     </section>
   </div>
   ================================================================ */

.idx-title {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
}

/* --- Encabezado de la pagina: glifo + nombre + descripcion. Es el UNICO titulo,
       la tabla ya no repite el nombre del modulo. --- */
.idx-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 40px;
}

.idx-glifo {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 19px;
    background: linear-gradient(135deg, #0a1a3f 0%, #1478ff 100%);
    box-shadow: 4px 5px 10px rgba(10, 26, 63, .35);
}

.idx-head-text h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.idx-head-text p {
    margin: 4px 0 0;
    color: #5b6784;
    font-size: 14px;
}

.idx-head-tools {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Total de registros. El numero lo manda el backend en el header Counting. */
.idx-count {
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #16305e;
    background: #e9f0fb;
    border: 1px solid #d7e1f3;
    white-space: nowrap;
}

/* --- Barra de acciones, FUERA del panel de la tabla --- */
.idx-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-bottom: 38px;
}

.idx-sub {
    margin: 6px 0 22px;
    color: #5b6784;
    font-size: 13px;
}

/* Sin borde claro alrededor (se veia una linea celeste encima de la cabecera azul).
   A la izquierda va una linea del mismo azul del titulo, y a la derecha y abajo la
   sombra: asi el panel queda cerrado por los cuatro lados. */
.idx-panel {
    overflow: hidden;
    border: 0;
    border-left: 2px solid #16305e;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 5px 6px 0 rgba(44, 95, 173, .24);
}

.idx-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 20px;
    color: #ffffff;
    background: #0a1a3f;
}

    .idx-panel-head b {
        font-size: 15px;
    }

    .idx-panel-head b i {
        margin-right: 7px;
    }

.idx-head-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Acciones a la izquierda, buscador a la derecha. La cabecera azul queda solo con el titulo. */
.idx-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid #edf1f7;
    background: #fbfcff;
}

.idx-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* Se va solo a la derecha, haya o no botones a la izquierda.
   El ancho da cabida al FilterComponent completo (campo + Search + Clear). */
.idx-search {
    flex: 0 1 620px;
    min-width: 300px;
    margin-left: auto;
}

/* --- Tablero: la fila de numeros sobre el listado, en todos los Index ---
   Un solo card. El color de la barra lateral se pide por su nombre, para que la
   misma clase sirva en cualquier pantalla sin inventarle un prefijo propio. */
.idx-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.idx-tile {
    border: 1px solid #e6ecf6;
    border-left: 6px solid #16305e;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 5px 6px 0 rgba(44, 95, 173, .24);
    padding: 10px 14px;
}

    .idx-tile.is-green {
        border-left-color: #198754;
    }

    .idx-tile.is-red {
        border-left-color: #dc3545;
    }

    .idx-tile.is-amber {
        border-left-color: #f59f00;
    }

    .idx-tile.is-orange {
        border-left-color: #fd7e14;
    }

    .idx-tile.is-blue {
        border-left-color: #2c5fad;
    }

    .idx-tile.is-cyan {
        border-left-color: #0dcaf0;
    }

    .idx-tile.is-purple {
        border-left-color: #6f42c1;
    }

.idx-tile-label {
    color: #6b7690;
    font-size: 12px;
}

.idx-tile-value {
    color: #152238;
    font-size: 22px;
    font-weight: 700;
}

/* --- Tabla --- */
.idx-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

    /* Barra de titulo de la tabla: azul con letras blancas, para que se lea como cabecera */
    .idx-table thead th {
        padding: 12px 20px;
        color: #ffffff;
        font-size: 13px;
        font-weight: 600;
        text-align: left;
        letter-spacing: .06em;
        text-transform: uppercase;
        background: #16305e;
        white-space: nowrap;
    }

    .idx-table td {
        padding: 13px 20px;
        font-size: 1rem;
        vertical-align: middle;
        border-bottom: 1px solid #edf1f7;
    }

    /* Zebra: va ANTES del hover para que el hover gane (misma especificidad, manda el orden) */
    .idx-table tbody tr:nth-child(even) td {
        background: #e9f0fb;
    }

    .idx-table tbody tr:hover td {
        background: #dae5f7;
    }

    .idx-table tbody tr:last-child td {
        border-bottom: 0;
    }

/* Nombre principal de la fila y su dato secundario */
.idx-name {
    font-weight: 700;
    color: #152238;
}

/* Texto corto en la celda; el dato completo sale en un globo propio al pasar el mouse.
   Sin JavaScript: el texto viaja en data-tip y lo pinta ::after. */
.idx-tip {
    position: relative;
    white-space: nowrap;
    cursor: default;
    border-bottom: 1px dashed #c3cfe2;
}

    .idx-tip::after {
        content: attr(data-tip);
        position: absolute;
        left: 50%;
        bottom: calc(100% + 9px);
        transform: translateX(-50%) translateY(4px);
        padding: 7px 12px;
        border-radius: 8px;
        background: #0a1a3f;
        color: #ffffff;
        font-size: 12.5px;
        font-weight: 600;
        white-space: nowrap;
        box-shadow: 0 8px 18px rgba(6, 18, 44, .35);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .15s ease, transform .15s ease;
        z-index: 30;
    }

    /* Punta del globo */
    .idx-tip::before {
        content: "";
        position: absolute;
        left: 50%;
        bottom: calc(100% + 3px);
        transform: translateX(-50%) translateY(4px);
        border: 6px solid transparent;
        border-top-color: #0a1a3f;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .15s ease, transform .15s ease;
        z-index: 30;
    }

    .idx-tip:hover::after,
    .idx-tip:hover::before {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }

.idx-meta {
    margin-top: 2px;
    color: #6b7690;
    font-size: 13px;
}

.idx-who {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Estado: reemplaza el checkbox deshabilitado */
.idx-pill {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

    .idx-pill.is-on {
        color: #146c43;
        background: #e6f5ec;
    }

    .idx-pill.is-off {
        color: #9a6700;
        background: #fff6e0;
    }

    /* Para lo que corta el servicio: suspendido, anulado */
    .idx-pill.is-danger {
        color: #ffffff;
        background: #dc3545;
    }

/* Si / No de una sola columna, cuando la fila tiene varios booleanos */
.idx-flag {
    font-size: 15px;
}

    .idx-flag.is-on {
        color: #198754;
    }

    .idx-flag.is-off {
        color: #b9c2d3;
    }

/* Botones de la fila: siempre juntos a la derecha */
.idx-actions {
    display: flex;
    gap: 7px;
    justify-content: flex-end;
    white-space: nowrap;
}

.idx-panel-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #edf1f7;
    background: #fbfcff;
}

    /* La paginacion vive dentro del pie, sin margenes propios */
    .idx-panel-foot .pagination {
        margin: 0;
    }

@media (max-width: 767.98px) {
    .idx-toolbar,
    .idx-search {
        flex: 1 1 100%;
    }
}

/* ================================================================
   BOTONES GRANDES  (familia .btn-gradient-*)
   Los de los Index y los de los formularios: misma forma, misma sombra y el
   mismo juego al pasar el mouse; solo cambia el color. Los usan los
   componentes de SharedButtonForm (ButtonFormNew, ButtonFormSave,
   ButtonFormSaveOnClick, ButtonFormBack, AnchorFormBack, ButtonFormDark,
   ButtonFormRed).

   Viven aqui, y no en un .razor.css de pagina, porque el CSS con alcance
   de una pagina NO llega al marcado de un componente hijo.
   ================================================================ */

/* El molde es el del escritorio (SharedButtonForm.xaml + Colors.xaml del WPF):
   boton BLANCO con borde fino y esquina 8, una franja de color a la izquierda y
   el texto en ese mismo color, no en blanco.

   La franja mide 42 y lleva el icono dentro cuando el boton tiene icono, y se
   encoge a 5 cuando es solo texto (por eso el :has(i)). Asi el acento esta
   siempre.

   La sombra va SOLIDA y sin difuminar, en gris azulado y no en negro: estos
   botones tambien viven sobre el azul oscuro de las cabeceras, donde una sombra
   negra no se distingue.

   Ojo: el <i> trae style="margin-right:5px" en el marcado del componente, asi
   que hay que ganarle con !important. Es el precio de no tocar los .razor. */

.btn-gradient-blue,
.btn-gradient-green,
.btn-gradient-dark,
.btn-gradient-red,
.btn-gradient-purple {
    align-items: stretch;
    background: #fff;
    border: 1px solid #D7DEEC;
    border-radius: 8px;
    color: #16305E;
    display: inline-flex;
    font-weight: 500;
    gap: 0;
    height: 44px;
    min-width: 124px;
    overflow: hidden;
    padding: 0;
    text-decoration: none;
    box-shadow: 2px 2px 0 #7C8CA8;
    transition: background .18s ease;
}

    /* La franja con el icono dentro */
    .btn-gradient-blue > i,
    .btn-gradient-green > i,
    .btn-gradient-dark > i,
    .btn-gradient-red > i,
    .btn-gradient-purple > i {
        align-items: center;
        color: #fff;
        display: flex;
        flex: 0 0 42px;
        font-size: 15px;
        justify-content: center;
        margin: 0 !important;
    }

    /* Sin icono la franja se encoge, pero no desaparece */
    .btn-gradient-blue:not(:has(i))::before,
    .btn-gradient-green:not(:has(i))::before,
    .btn-gradient-dark:not(:has(i))::before,
    .btn-gradient-red:not(:has(i))::before,
    .btn-gradient-purple:not(:has(i))::before {
        content: "";
        flex: 0 0 5px;
    }

    .btn-gradient-blue > span:not([class*="spinner"]),
    .btn-gradient-green > span:not([class*="spinner"]),
    .btn-gradient-dark > span:not([class*="spinner"]),
    .btn-gradient-red > span:not([class*="spinner"]),
    .btn-gradient-purple > span:not([class*="spinner"]) {
        align-self: center;
        flex: 1;
        padding: 0 18px;
        text-align: center;
    }

    /* Mientras guarda no hay icono: el girador necesita su propio aire */
    .btn-gradient-blue > [class*="spinner"],
    .btn-gradient-green > [class*="spinner"],
    .btn-gradient-dark > [class*="spinner"],
    .btn-gradient-red > [class*="spinner"],
    .btn-gradient-purple > [class*="spinner"] {
        align-self: center;
        margin-left: 14px;
    }

    /* Al pasar el mouse solo se tinta el fondo: el boton NO se mueve de sitio */
    .btn-gradient-blue:hover,
    .btn-gradient-green:hover,
    .btn-gradient-dark:hover,
    .btn-gradient-red:hover,
    .btn-gradient-purple:hover {
        background: #E8EEFA;
        text-decoration: none;
    }

    .btn-gradient-blue:active,
    .btn-gradient-green:active,
    .btn-gradient-dark:active,
    .btn-gradient-red:active,
    .btn-gradient-purple:active {
        opacity: .86;
    }

    .btn-gradient-blue:disabled,
    .btn-gradient-green:disabled,
    .btn-gradient-dark:disabled,
    .btn-gradient-red:disabled,
    .btn-gradient-purple:disabled {
        cursor: default;
        opacity: .55;
    }

/* Talla chica: para las barras de accion de un panel, donde el boton de 44px
   pesa demasiado. Mismo diseno, solo mas compacto. Se usa como
   CssClass="btn-gradient-green is-sm". */
.btn-gradient-blue.is-sm,
.btn-gradient-green.is-sm,
.btn-gradient-dark.is-sm,
.btn-gradient-red.is-sm,
.btn-gradient-purple.is-sm {
    height: 32px;
    min-width: 0;
    font-size: 12px;
}

    .btn-gradient-blue.is-sm > i,
    .btn-gradient-green.is-sm > i,
    .btn-gradient-dark.is-sm > i,
    .btn-gradient-red.is-sm > i,
    .btn-gradient-purple.is-sm > i {
        flex: 0 0 30px;
        font-size: 13px;
    }

    .btn-gradient-blue.is-sm > span:not([class*="spinner"]),
    .btn-gradient-green.is-sm > span:not([class*="spinner"]),
    .btn-gradient-dark.is-sm > span:not([class*="spinner"]),
    .btn-gradient-red.is-sm > span:not([class*="spinner"]),
    .btn-gradient-purple.is-sm > span:not([class*="spinner"]) {
        padding: 0 12px;
    }

/* Accion principal: crear, guardar */
.btn-gradient-blue {
    color: #16305E;
}

    .btn-gradient-blue > i,
    .btn-gradient-blue:not(:has(i))::before {
        background: #2C5FAD;
    }

/* Accion afirmativa: activar, aprobar */
.btn-gradient-green {
    color: #146C44;
}

    .btn-gradient-green > i,
    .btn-gradient-green:not(:has(i))::before {
        background: #198754;
    }

/* Accion secundaria: volver, procesos en bloque. Gris, para no competirle
   al principal. */
.btn-gradient-dark {
    color: #5B6B85;
}

    .btn-gradient-dark > i,
    .btn-gradient-dark:not(:has(i))::before {
        background: #8A96AB;
    }

/* Accion especial: dejar el equipo listo, provisionar. Morado para que no se
   confunda con guardar (azul) ni con aprobar (verde). */
.btn-gradient-purple {
    color: #4a2a85;
}

    .btn-gradient-purple > i,
    .btn-gradient-purple:not(:has(i))::before {
        background: #6f42c1;
    }

/* Accion destructiva en bloque */
.btn-gradient-red {
    color: #B02A37;
}

    .btn-gradient-red > i,
    .btn-gradient-red:not(:has(i))::before {
        background: #DC2626;
    }


/* ============================================================================
   SPIX MODALES
   ----------------------------------------------------------------------------
   Un solo lugar para el aspecto de los 159 modales. Todos comparten las mismas
   clases de Bootstrap, asi que esto los cambia a todos sin tocar un solo .razor.

   La forma: encabezado con el degradado azul del layout y la X arriba a la
   derecha; cuerpo blanco con los campos en el azul gris de la zebra; y pie
   BLANCO, para que los botones compartidos (violeta-azul y negro) se lean.
   ============================================================================ */

/* El contenedor deja de tener padding parejo: el encabezado y el pie tienen que
   llegar a los bordes. El aire se lo pone cada bloque por dentro. */
.modal-content.modal-create-shadow {
    /* El aire lateral vive aqui; el encabezado y el pie lo anulan con margen
       negativo para llegar a los bordes. Asi no importa que markup tenga adentro
       cada formulario: todo lo del medio queda sangrado por igual. */
    padding: 0 20px !important;
    overflow: hidden;
    border: 1px solid #d5dfef;
    border-radius: 10px;
}

/* ---------- Encabezado ---------- */
.modal-content.modal-create-shadow .modal-header {
    position: relative;
    margin: 0 -20px 18px !important;
    padding: 14px 58px 14px 20px;
    background: linear-gradient(120deg, #081634 0%, #0f2c60 55%, #1d4a96 100%);
    border: 0;
    border-bottom: 2px solid #5b8de0;
}

    /* La barrita celeste a la izquierda del titulo */
    .modal-content.modal-create-shadow .modal-header::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 20px;
        width: 3px;
        height: 30px;
        margin-top: -15px;
        border-radius: 2px;
        background: #8ab4f8;
    }

.modal-content.modal-create-shadow .modal-title {
    margin: 0;
    padding-left: 15px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
}

    .modal-content.modal-create-shadow .modal-title i {
        color: #8ab4f8;
    }

/* La X: cuadrada y translucida, para que se vea sobre el degradado */
.modal-content.modal-create-shadow .btn-close-modal {
    top: 50%;
    right: 16px;
    width: 30px;
    height: 30px;
    margin-top: -15px;
    color: #dce7f7;
    background-color: rgba(255, 255, 255, .12);
    border-radius: 6px;
    box-shadow: none;
}

    .modal-content.modal-create-shadow .btn-close-modal:hover {
        background-color: rgba(255, 255, 255, .24);
        transform: none;
    }

    .modal-content.modal-create-shadow .btn-close-modal:active {
        background-color: rgba(255, 255, 255, .3);
        transform: scale(.95);
    }

/* ---------- Los campos: etiqueta pegada, en el azul gris de la zebra ----------
   La FORMA (el marco redondeado que envuelve rotulo y caja) estaba amarrada al
   modal, igual que los colores. Por eso los filtros de las pantallas se veian
   como cajas sueltas aunque tuvieran el color.
   Ahora vale en toda la aplicacion. */
.input-group {
    border: 1px solid #cfdcef;
    border-radius: 6px;
    overflow: hidden;
}

    /* EXCEPCION: el autocompletar cuelga su lista DENTRO del input-group, en
       position:absolute. Con overflow hidden esa lista se RECORTA y no se ve nada:
       el usuario escribe las tres letras y no pasa nada.

       Se reconoce por .position-relative, que es justo lo que el autocompletar le
       pone al grupo para poder colgar la lista. Ningun campo normal lo lleva.
       Se usa eso y no :has(.list-group) porque :has solo entra cuando la lista ya
       existe, y el borde cambiaria justo al abrirla.

       Como aqui no se recorta, el redondeo se pone a mano en los extremos. */
    .input-group.position-relative {
        overflow: visible;
    }

        .input-group.position-relative > :first-child {
            border-radius: 5px 0 0 5px;
        }

        .input-group.position-relative > .form-control {
            border-radius: 0 5px 5px 0;
        }

/* El look de los campos: rotulo azul claro a la izquierda y la caja en azul muy
   suave. Estaba amarrado SOLO a los modales, asi que los filtros de las pantallas
   y los reportes se veian grises y descuadrados.

   Ahora vale en toda la aplicacion: cualquier input-group se ve igual, este
   dentro de un modal o no. Los modales no cambian, ya se veian asi. */
.input-group-text {
    color: #33456b;
    font-size: 13px;
    background: #dbe6f8;
    border: 0;
    border-right: 1px solid #cfdcef;
    border-radius: 0;
}

.input-group > .form-control,
.input-group > .form-select {
    background: #e9f0fb;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

    .input-group > .form-control:focus,
    .input-group > .form-select:focus {
        background: #fff;
        box-shadow: inset 0 0 0 2px #5b8de0;
    }

/* ---------- Pie ----------
   La fila de botones de los formularios pasa a ser el pie: blanca, pegada a los
   bordes y con los botones a la izquierda.

   El orden va al reves que en el marcado: los .razor ponen Guardar y luego
   Volver, pero en pantalla Volver va primero. Se invierte con row-reverse para
   no tocar los 159 modales.

   Se busca por :has() y no por la clase del gap: los pies estan escritos con
   gap-3, gap-2 y hasta sin gap, asi que amarrarlo a uno solo dejaba formularios
   con los botones al reves (Editar Compra, por ejemplo). Lo que de verdad define
   un pie es que adentro tenga los botones compartidos.

   Y por eso el justify-content es flex-END: al invertir el eje, el "inicio"
   pasa a ser la derecha, asi que para dejarlos pegados a la izquierda hay que
   pedir el final. */
.modal-content.modal-create-shadow .d-flex.justify-content-center:has(> .btn-gradient-blue),
.modal-content.modal-create-shadow .d-flex.justify-content-center:has(> .btn-gradient-dark),
.modal-content.modal-create-shadow .d-flex.justify-content-center:has(> .btn-gradient-green),
.modal-content.modal-create-shadow .d-flex.justify-content-center:has(> .btn-gradient-red),
.modal-content.modal-create-shadow .d-flex.justify-content-center:has(> .btn-gradient-purple) {
    flex-direction: row-reverse;
    gap: 12px;
    justify-content: flex-end !important;
    margin: 18px -20px 0 !important;
    padding: 14px 20px;
    background: #fff;
    border-top: 1px solid #e3e9f3;
}

/* ============================================================================
   DOBLE CLICK EN LAS FILAS
   ----------------------------------------------------------------------------
   Igual que en el escritorio: doble click sobre la fila abre Editar, o el
   Detalle en los modulos que no editan de a uno.

   El user-select es necesario: sin el, el doble click pinta de azul el texto de
   la celda y queda seleccionado mientras se abre el modal.
   ============================================================================ */
.row-dbl {
    cursor: pointer;
    user-select: none;
}

    .row-dbl:hover {
        background-color: #dce8fa !important;
    }


/* ============================================================
   Tarjetas y filtros de los reportes (rp-*)
   ============================================================
   Vive aqui, en el CSS global, y no en un .razor.css por pantalla. Razon: el bundle del
   CSS scoped solo se regenera en una compilacion completa, y con Hot Reload una pantalla
   nueva sale sin estilos aunque el archivo exista. Aqui carga siempre.

   Los reportes que ya traen su propio .razor.css no cambian: el scoped pesa mas por el
   atributo [b-xxxx] y sigue mandando sobre estas reglas, que son las mismas.
   ============================================================ */
/* Los totales del reporte */
.rp-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.rp-tile {
    border: 1px solid #e6ecf6;
    border-left: 6px solid #16305e;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 5px 6px 0 rgba(44, 95, 173, .24);
    padding: 10px 14px;
}

    .rp-tile.is-money {
        border-left-color: #198754;
    }

    .rp-tile.is-bad {
        border-left-color: #dc3545;
    }

.rp-tile-label {
    color: #6b7690;
    font-size: 12px;
}

.rp-tile-value {
    color: #152238;
    font-size: 22px;
    font-weight: 700;
}

/* La fila de totales del reporte agrupado */
.rp-total td {
    border-top: 2px solid #16305e;
    color: #152238;
    font-weight: 700;
}

/* El estado, al lado del buscador y sin ocupar la fila entera */
.rp-inline {
    flex: 0 1 260px;
    min-width: 200px;
}

/* El titulo de cada bloque del reporte */
.rp-section {
    color: #16305e;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin: 22px 0 10px;
}

    .rp-section i {
        margin-right: 7px;
    }

/* Los filtros de fecha */
.rp-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 8px;
}

.rp-field.is-date {
    flex: 0 1 270px;
}

.rp-field.is-button {
    flex: 0 0 auto;
}

/* Los colores de cada tile del recaudo */
.rp-tile.is-cash {
    border-left-color: #198754;
}

.rp-tile.is-bank {
    border-left-color: #2c5fad;
}

.rp-tile.is-pre {
    border-left-color: #0dcaf0;
}

.rp-tile.is-discount {
    border-left-color: #6f42c1;
}

.rp-tile.is-issued {
    border-left-color: #f59f00;
}

/* El renglon chico debajo del numero grande del tile */
.rp-tile-foot {
    color: #6b7690;
    font-size: 12px;
}

/* La franja tibia: lo que todavia no se pierde pero ya preocupa */
.rp-tile.is-warm {
    border-left-color: #fd7e14;
}

/* La aclaracion de como se cuenta el reporte */
.rp-note {
    border-left: 4px solid #2c5fad;
    background: #f4f8ff;
    border-radius: 8px;
    color: #48566f;
    font-size: 13px;
    padding: 8px 12px;
    margin-bottom: 8px;
}

/* El tipo de movimiento, al lado de las fechas */
.rp-field.is-event {
    flex: 0 1 260px;
    min-width: 200px;
}
