:root {
    --a3-red: rgb(214, 37, 55);
    --a3-pink: rgb(255, 107, 145);
    --a3-orange: rgb(255, 105, 26);
    --a3-yellow: rgb(246, 185, 41);
    --a3-green: rgb(35, 182, 68);
    --a3-cyan: rgb(24, 184, 202);
    --a3-blue: rgb(20, 129, 248);
    --a3-purple: rgb(128, 74, 193);
    --clr-primary: #81d4fa;
    --clr-primary-light: #e1f5fe;
    --clr-primary-dark: #4fc3f7;
    --clr-gray100: #f9fbff;
    --clr-gray150: #f4f6fb;
    --clr-gray200: #eef1f6;
    --clr-gray300: #e1e5ee;
    --clr-gray400: #767b91;
    --clr-gray500: #4f546c;
    --clr-gray600: #2a324b;
    --clr-gray700: #161d34;
    --clr-pending: #fff0c2;
    --clr-pending-font: #a68b00;
    --clr-unpaid: #ffcdd2;
    --clr-unpaid-font: #c62828;
    --clr-paid: #7cda8b;
    --clr-paid-font: #1d6d21;
    --clr-link: #2962ff;
    --naranja-brand: #ff6a1a;
    --texto-principal: #111827;
    --texto-secundario: #6b7280;
    --radio-borde: 12px;
}

.icon.gris {
    stroke: #87827d;
    max-width: 42px;
    padding: 0.6rem;
    border: 1px solid #dddbda;
    border-radius: 50%;
}

.right {
    right: 0;
}

.list-group-item-action {
    cursor: pointer;
}

.provision h4 {
    font-size: 1.3em;
    font-weight: 400;
}

.provision label,
.provision .label {
    position: relative;
    margin-bottom: 0;
    margin-left: 1px;
    padding: 2px 6px 2px 0;
    border-radius: 3px;
    background: #fff;
    z-index: 3;
}

.provision .custom-file {
    display: block;
    margin-bottom: 0.7rem;
}

.provision .custom-file label {
    position: absolute;
    color: var(--negro-op-7) !important;
    z-index: 1;
}

.provision label + input,
.provision .label + input,
.provision label + .form-control,
.provision .label + .form-control,
.provision label + select,
.provision .label + select,
.provision label + .custom-select,
.provision .label + .custom-select,
.provision label + .custom-file label,
.provision .label + .custom-file label {
    margin-top: -0.5em;
    padding-left: 0;
    font-size: 1.3em;
    border-color: transparent;
}

.provision .label + .custom-file label::after {
    display: none;
}

.provision input:disabled,
.provision select:disabled,
.provision textarea:disabled,
.provision .custom-file-input:disabled + .custom-file-label {
    color: var(--negro);
    background-color: transparent;
}

.vivienda h4 {
    font-size: 1.3em;
    font-weight: 400;
}

.vivienda label,
.vivienda .label {
    position: relative;
    margin-bottom: 0;
    margin-left: 1px;
    padding: 2px 6px 2px 0;
    border-radius: 3px;
    background: #fff;
    z-index: 3;
}

.vivienda .custom-file {
    display: block;
    margin-bottom: 0.7rem;
}

.vivienda .custom-file label {
    position: absolute;
    color: var(--negro-op-7) !important;
    z-index: 1;
}

.vivienda label + input,
.vivienda .label + input,
.vivienda label + .form-control,
.vivienda .label + .form-control,
.vivienda label + select,
.vivienda .label + select,
.vivienda label + .custom-select,
.vivienda .label + .custom-select,
.vivienda label + .custom-file label,
.vivienda .label + .custom-file label {
    margin-top: -0.5em;
    padding-left: 0;
    font-size: 1.3em;
    border-color: transparent;
}

.vivienda .label + .custom-file label::after {
    display: none;
}

.vivienda input:disabled,
.vivienda select:disabled,
.vivienda textarea:disabled,
.vivienda .custom-file-input:disabled + .custom-file-label {
    color: var(--negro);
    background-color: transparent;
}

.vivienda input[type=checkbox]:disabled {
    background-color: currentColor;
}

/* Botón cargando */
.spinner-dark {
    display: inline-block;
    width: 50px;
    margin: auto;
    text-align: center;
}

.spinner-dark > span {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 3px;
    border-radius: 100%;
    background-color: var(--naranja);
    -webkit-animation: sk-bouncedelay 1.4s infinite ease-in-out both;
    animation: sk-bouncedelay 1.4s infinite ease-in-out both;
}

.spinner-dark .bounce1 {
    -webkit-animation-delay: -0.32s;
    animation-delay: -0.32s;
}

.spinner-dark .bounce2 {
    -webkit-animation-delay: -0.16s;
    animation-delay: -0.16s;
}

.btn .spinner-dark,
button .spinner-dark,
.btn.cargando .texto,
button.cargando .texto {
    display: none;
}

.btn.cargando .spinner-dark,
button.cargando .spinner-dark {
    display: inline-block;
}

.btn .spinner-dark > span,
button .spinner-dark > span {
    background: #212121;
}

.btn-desasignar {
    background: #fff;
    padding: .5rem;
    border: none;
    border-radius: 100%;
    transition: background .1s ease;
}

.btn-light {
    background-color: #fff;
}

.btn-desasignar:hover{
    background: rgb(224, 224, 224);
}

label.required::after {
    color: #ff7a33;
    content: "*";
}

.floating-button {
    display: flex;
    position: fixed;
    width: 50px;
    height: 50px;
    bottom: 30px;
    right: 30px;
    background-color: var(--blanco);
    border-radius: 50px;
    text-align: center;
    box-shadow: 0 4px 16px rgb(0 0 0 / 10%);
    z-index: 1000;
}

.floating-button:hover {
    box-shadow: 0 8px 20px rgb(0 0 0 / 15%);
}

.img-cuadrada.user {
    margin-top: 14px;
    box-shadow: 0 0 0 14px rgba(255, 255, 255, 0.1);
    background-image: url("../img/cliente-sin-foto.d8f27406d5f1.jpg");
}

form.mayusculas input[type="text"]:not(.no-mayusculas),
form.mayusculas textarea:not(.no-mayusculas) {
    text-transform: uppercase;
}

.rounded-xl {
    border-radius: 1.5rem;
}

@media screen and (min-width: 320px) {
    #pdf-canvas {
        max-width: 320px;
    }
    #pdf-wrapper {
        flex-direction: column;
    }
}

.tabla-invasion .page-info {
    width: 100%;
    text-align: right;
    padding: .5rem 0;
    color: #6c7084;
    font-size: .75rem;
}

@media screen and (max-width: 580px) {
    .card h5.lead {
        font-size: 1rem;
    }
    .card .icon.saturate {
        max-width: 35px;
    }
    .tabla-invasion .text-truncate {
        max-width: 190px;
    }
}

@media screen and (min-width: 580px) {
    #pdf-canvas {
        max-width: 480px;
    }
    #pdf-wrapper {
        flex-direction: column;
    }
}

@media screen and (min-width: 768px) {
    #pdf-canvas {
        max-width: 640px;
    }
    #pdf-wrapper {
        flex-direction: row;
    }
}

@media screen and (min-width: 900px) {
    #pdf-canvas {
        max-width: 720px;
    }
    #pdf-wrapper {
        flex-direction: row;
    }
    .tabla-invasion .text-truncate {
        max-width: 290px;
    }    
}

@media screen and (min-width: 1200px) {
    #pdf-canvas {
        max-width: 100%;
    }
    #pdf-wrapper {
        flex-direction: row;
    }
}

.badge-soft-success {
    color: #28a745;
    background-color: #ccf6e4;
}

.badge-soft-danger {
    color: #df3d4d;
    background-color: #ffdfe2;
}

.card-header.no-border {
    border-bottom: none;
}

.icon.card-background {
    position: absolute;
    width: 100%;
    height: 100%;
    margin: auto;
    left: 50%;
    bottom: 0.75%;
    opacity: 0.125;
}

.card-background.third {
    left: 35%;
}

#notificationCount {
    position: absolute;
}

.card-body .notificacion {
    padding: 1rem 0;
    font-size: 1rem;
}

.notificacion {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    padding: 1rem;
    color: var(--negro);
}

.notificacion.info .icon {
    fill: var(--blue);
}

.notificacion.success .icon {
    fill: var(--success);
}

.notificacion.warning .icon {
    fill: var(--warning);
}

.notificacion.danger .icon {
    fill: var(--danger);
}

.notificacion.leida {
    color: rgba(0, 0, 0, 0.3);
}

.notificacion.leida .icon {
    opacity: 0.6;
}

.dropdown-toggle::after {
    display: none;
}

.menu-notificaciones {
    left: unset;
}

.menu-notificaciones .dropdown-item:active {
    color: var(--negro);
    background-color: var(--gris-2);
}

#menuNotificaciones[aria-expanded="true"] svg {
    fill: var(--gris-2);
    stroke: var(--gris-2);
}

#progressbar {
    margin-bottom: 30px;
    overflow: hidden;
}

#progressbar li {
    list-style-type: none;
    color: #99a2a8;
    font-size: 0.75rem;
    width: calc(100% / 3);  /* Actualizado de 4 a 3 pasos */
    float: left;
    position: relative;
}

#progressbar li.rechazada::before {
    content: "\f129" !important;
}

#progressbar li:nth-child(1)::before {
    content: "\f3b3";  /* Paso 1: Pendiente - icono de reloj */
}

#progressbar li:nth-child(2)::before {
    content: "\f121";  /* Paso 2: Autorizada - icono de checkmark */
}

#progressbar li:nth-child(3)::before {
    content: "\f353";  /* Paso 3: Pagada - icono de dinero */
}

#progressbar li::before {
    font: normal normal normal 25px/50px Ionicons;
    height: 50px;
    width: 50px;
    line-height: 50px;
    display: block;
    background: #eaf0f4;
    border-radius: 50%;
    margin: 0 auto 10px auto;
}

#progressbar li::after {
    content: "";
    width: 100%;
    height: 10px;
    background: #eaf0f4;
    position: absolute;
    left: -50%;
    top: 21px;
    z-index: -1;
}

#progressbar li:last-child::after {
    width: 150%;
}

#progressbar li.active {
    color: var(--naranja);
}

#progressbar li.active:before,
#progressbar li.active:after {
    background: var(--naranja);
    color: var(--blanco);
}


.card.loading {
    height: 150px;
}

.card.loading::before {
    content: '';
    display: block;
    position: absolute;
    left: -150px;
    top: 0;
    height: 100%;
    width: 150px;
    background: linear-gradient(to right, transparent 0%, #E8E8E8 50%, transparent 100%);
    animation: load 1s ease infinite;
}

@keyframes load {
    from {
        left: -150px;
    }
    to   {
        left: 100%;
    }
}

.font-size-100 {
    font-size: 100%;
}

.titulo-reporte {
    overflow: hidden;
    text-align: center;
}

.titulo-reporte:before,
.titulo-reporte:after {
    background-color: var(--gris-med);
    content: "";
    display: inline-block;
    height: 1px;
    position: relative;
    vertical-align: middle;
    width: 50%;
}

.titulo-reporte:before {
    right: 0.5em;
    margin-left: -50%;
}

.titulo-reporte:after {
    left: 0.5em;
    margin-right: -50%;
}

.card-footer.clean {
    background-color: rgba(0, 0, 0, 0);
    border-top: none;
}

.z-index-1000 {
    z-index: 1000;
}

.text-dark-op-5 {
    color: var(--negro-op-5);
}

.text-dark-op-7 {
    color: var(--negro-op-7);
}

.font-size-75 {
    font-size: 75%;
}

.display-5 {
    font-size: 3.5rem;
    font-weight: 300;
    line-height: 1.2;
}

@media screen and (min-width: 320px) {
    .display-5 {
        font-size: 2.15rem;
    }
}

@media screen and (min-width: 580px) {
    .display-5 {
        font-size: 3rem;
    }
}

@media screen and (min-width: 768px) {
    .display-5 {
        font-size: 3.5rem;
    }
}

.badge-lg {
    font-size: 100%;
    font-weight: 600;
    padding: 0.5em;
    letter-spacing: 0.01rem;
}

/* historial de detenciones */
.timeline {
    border-left: 2px solid #cccccc;
    margin: 0 auto;
    position: relative;
    list-style: none;
}

@media (max-width: 767px) {
    .timeline {
        max-width: 98%;
        padding: 25px;
    }
}

.timeline h3 {
    font-weight: 600;
    font-size: 1rem;
}

.timeline h4 {
    font-weight: 600;
    font-size: 0.9rem;
}

.timeline .event {
    border-bottom: 1px dashed #e8ebf1;
    padding-bottom: 5px;
    padding-top: 30px;
    margin-bottom: 5px;
    position: relative;
}

.timeline .event:last-of-type {
    padding-bottom: 0;
    margin-bottom: 0;
    border: none;
}

.timeline .event:before,
.timeline .event:after {
    position: absolute;
    display: block;
    top: 0;
}

.timeline .event:before {
    content: attr(data-date);
    font-size: 0.75rem;
    color: var(--secondary);
    min-width: 120px;
    left: 0px;
    text-align: left;
}

.timeline .event:after {
    left: -27px;
    background: #fff;
    border-radius: 50%;
    height: 9px;
    width: 9px;
    content: "";
    top: 32px;
}

.timeline .event.danger:after {
    -webkit-box-shadow: 0 0 0 3px var(--naranja);
    box-shadow: 0 0 0 3px var(--naranja);
}

.timeline .event.success:after {
    -webkit-box-shadow: 0 0 0 3px var(--teal);
    box-shadow: 0 0 0 3px var(--teal);
}

.timeline .event.warning:after {
    -webkit-box-shadow: 0 0 0 3px var(--warning);
    box-shadow: 0 0 0 3px var(--warning);
}

.timeline .event.primary:after {
    -webkit-box-shadow: 0 0 0 3px var(--primary);
    box-shadow: 0 0 0 3px var(--primary);
}

.timeline .event.secondary:after {
    -webkit-box-shadow: 0 0 0 3px var(--secondary);
    box-shadow: 0 0 0 3px var(--secondary);
}

input[readonly] {
    cursor: default;
}

.mb-6 {
    margin-bottom: 4rem !important;
}

.justify-content-evenly {
    -ms-flex-pack: distribute !important;
    justify-content: space-evenly !important;
}

.editable .esconder {
    display: none;
}

.editable.editando .esconder {
    display: inherit;
}

.vivienda h4 {
    font-size: 1.3em;
    font-weight: 400;
}

.img-shadow {
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.1);
}

.gap {
    gap: 0.25rem;
}

.gap-1 {
    gap: 1rem;
}

.gap-2 {
    gap: 1.5rem;
}

.ventana.flotante.der .contenedor {
    max-width: 20%;
    right: 0;
    max-height: 100%;
    border-radius: 0;
}

@media screen and (max-width: 768px) {
    .ventana.flotante.der .contenedor {
        max-width: 75%;
    }
}

@media screen and (min-width: 769px) and (max-width: 1200px) {
    .ventana.flotante.der .contenedor {
        max-width: 35%;
    }
}

.bg-gris-claro {
    background-color: var(--gris-claro-2);
}

.a3-red {
    color: var(--a3-red);
    stroke: var(--a3-red);
}

.a3-pink {
    color: var(--a3-pink);
    stroke: var(--a3-pink);
}

.a3-orange {
    color: var(--a3-orange);
    stroke: var(--a3-orange);
}

.a3-yellow {
    color: var(--a3-yellow);
    stroke: var(--a3-yellow);
}

.a3-green {
    color: var(--a3-green);
    stroke: var(--a3-green);
}

.a3-cyan {
    color: var(--a3-cyan);
    stroke: var(--a3-cyan);
}

.a3-blue {
    color: var(--a3-blue);
    stroke: var(--a3-blue);
}

.a3-purple {
    color: var(--a3-purple);
    stroke: var(--a3-purple);
}

.px-35 {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.card.button {
    cursor: pointer;
}

.card.button:not(.disabled):hover {
    box-shadow: 0 12px 24px rgb(0 0 0 / 10%);
}

#dropdown-notificaciones {
    max-height: 420px;
    overflow-y: auto;
    overflow-x: hidden;
}

@media screen and (max-width: 580px) {
    #dropdown-notificaciones {
        max-width: 360px;
    }
}

.truncate-text {
    max-width: 280px;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

/* Log in */
.login .form-group {
    overflow: hidden;
    margin-bottom: 0;
    padding: 15px 15px;
    border-bottom: none;
    position: relative;
    background: #edf2f5;
    border-bottom: 1px solid #e6edf1;
}

.login .form-group.first {
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}

.login .form-group.last {
    border-bottom-left-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
}

.login .form-group label {
    position: absolute;
    top: 50%;
    font-size: 12px;
    display: block;
    margin-bottom: 0;
    color: #b3b3b3;
    -webkit-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    -webkit-transition: 0.3s all ease;
    -o-transition: 0.3s all ease;
    transition: 0.3s all ease;
}

.login .form-group.field--not-empty label {
    margin-top: -20px;
}

.login .form-group .form-control {
    background: transparent;
    border: none;
    padding: 0;
    font-size: 18px;
    border-radius: 0;
    border-color: none;
    box-shadow: none;
}

.text-reset:hover {
    text-decoration: none;
}

.badge-outline-primary {
    color: #0067d5;
    border: 1px solid var(--primary);
    background: #007bff10;
}

.badge-outline-success {
    color: #1e7c33;
    border: 1px solid var(--success);
    background: #28a74610;
}

.badge-outline-yellow {
    color: #8f5e04;
    border: 1px solid var(--yellow);
    background: #ffc10715;
}

.badge-outline-secondary {
    color: #636b73;
    border: 1px solid var(--secondary);
    background: #6c757d10;
}

.badge-outline-warning {
    color: #a9540d;
    border: 1px solid var(--orange);
    background: #fd7e1410;
}

.badge-outline-danger {
    color: var(--danger);
    border: 1px solid var(--danger);
    background: #dc354510;
}

.badge-outline-info {
    color: #117686;
    border: 1px solid #17a2b8;
    background: #17a2b810;    
}

input.calculo-cierre {
    border: none;
    border-bottom: 1px solid black;
    width: 3ch;
}

input.calculo-cierre:focus {
    border: none;
    border-bottom: 1px solid black;
    box-shadow: none;
}

input.calculo-cierre:focus-visible {
    outline: none;
}

input.calculo-cierre::-webkit-outer-spin-button,
input.calculo-cierre::-webkit-inner-spin-button,
#pdf-controls input::-webkit-outer-spin-button,
#pdf-controls input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

#pdf-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: .5rem 1rem;
    gap: .35rem;
    background-color: #343a40;
    color: #fff;
    border-top-left-radius: .25rem;
    border-top-right-radius: .25rem;
}

#pdf-controls input {
    background: #191b1c;
    border: none;
    width: 3ch;
    color: #fff;    
}

#pdf-controls button {
    border: none;
    background: none;
    line-height: 1;
    padding: 0.5rem;
    border-radius: 100%;
    transition: background .1s ease;
}

#pdf-controls button:hover {
    background: #424649;
}

input.calculo-cierre,
#pdf-controls input {
    -moz-appearance: textfield;
}



.money-badge {
    background: var(--success);
    color: white;
    font-size: 0.83rem;
    font-weight: 600;
    text-align: center;
    border-radius: 0.25rem;
}

.flex-a-center {
    display: flex;
    align-items: center;
}

.flex-j-center {
    display: flex;
    justify-content: center;
}

.justify-content-around {
    justify-content: space-around;
}

.op-5 {
    opacity: 0.5;
}

.card.button .icon.saturate {
    filter: saturate(0);
}

.card.button:hover .icon.saturate {
    filter: saturate(1);
}

.card.button:active {
    background-color: var(--light);
}

.autocomplete-suggestions {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    background: #fff;
    cursor: pointer;
    overflow: auto;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
    border-bottom-right-radius: 5px;
    border-bottom-left-radius: 5px;
}

.autocomplete-suggestion {
    padding: 2px 5px;
    white-space: nowrap;
    overflow: hidden;
}

.autocomplete-no-suggestion {
    padding: 2px 5px;
}

.autocomplete-selected {
    background: #f0f0f0;
}

.autocomplete-suggestions strong {
    font-weight: bold;
    color: var(--dark);
}

.autocomplete-group {
    padding: 2px 5px;
    font-weight: bold;
    font-size: 16px;
    color: var(--dark);
    display: block;
    border-bottom: 1px solid var(--dark);
}

.nav-link {
    cursor: pointer;
    font-size: 1rem;
}

.pointer {
    cursor: pointer !important;
}

.mostrar-mas {
    display: flex;
}

.card.loading {
    height: 150px;
}

#pdf-loading {
    width: 50vh;
    height: 75vh;
    background: #fff;
    border-bottom-left-radius: .25rem;
    border-bottom-right-radius: .25rem;
    animation: pdf-loading 1.25s ease-in-out infinite;
}

@keyframes pdf-loading {
    0% {
        background: #fff;
    }
    50% {
        background: #dfdfdf;
    }
}

.card.loading::before {
    content: '';
    display: block;
    position: absolute;
    left: -150px;
    top: 0;
    height: 100%;
    width: 150px;
    background: linear-gradient(to right, transparent 0%, #E8E8E8 50%, transparent 100%);
    animation: load 1s ease infinite;
}

@keyframes load {
    from {
        left: -150px;
    }
    to   {
        left: 100%;
    }
}

#estatus-cierre {
    overflow: hidden;
    z-index: 10;
}

#estatus-cierre li {
    list-style-type: none;
    color: #99a2a8;
    font-size: 0.75rem;
/*     width: calc(100% / 5); */
    float: left;
    position: relative;
}

#estatus-cierre li.contabilidad::before {
    content: "\f127";
}

#estatus-cierre li.obra::before {
    content: "\f148";
}

#estatus-cierre li.administracion::before {
    content: "\f3e8";
}

#estatus-cierre li.gerente::before {
    content: "\f47c";
}

#estatus-cierre li.tesoreria::before {
    content: "\f353";
}

#estatus-cierre li.cobranza::before {
    content: "\f316";
}

#estatus-cierre li.cerrado::before {
    content: "\f122";
}

#estatus-cierre li.comisiones::before {
    content: "\f3ed";
}

#estatus-cierre li::before {
    content: "\f3b3";
    font: normal normal normal 40px/80px Ionicons;
    height: 80px;
    width: 80px;
    line-height: 80px;
    display: block;
    background: #eaf0f4;
    border-radius: 50%;
    margin: 0 auto 10px auto;
}

#estatus-cierre li::after {
    content: "";
    width: 100%;
    height: 25px;
    background: #eaf0f4;
    position: absolute;
    left: -50%;
    top: 25px;
    z-index: -1;
}

#estatus-cierre li:last-child::after {
    width: 100%;
}

#estatus-cierre li.active {
    color: var(--naranja);
}

#estatus-cierre li.inactive {
    color: var(--danger);
}

#estatus-cierre li.active:before {
    background: var(--naranja);
    color: var(--blanco);
}

#estatus-cierre li.inactive:before {
    background: var(--danger);
    color: var(--blanco);
}

.custom-scroll {
    max-height: 600px;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.custom-scroll::-webkit-scrollbar {
    width: 5px;
}

.custom-scroll::-webkit-scrollbar-track {
    background-color: #e4e4e4;
    border-radius: 9999px;
}

.custom-scroll::-webkit-scrollbar-thumb {
    border-radius: 9999px;
    background-color: #6c757d;
}

.blog-img {
    max-width: 420px;
    border: 1px solid #ededed;
    margin-top: 1.5rem;
    border-radius: .75rem;
}

@media screen and (max-width: 420px) {
    .blog-img {
        max-width: 250px;
    }
}

.blog ul {
    margin-bottom: 1rem;
}

.blog-tag {
    background-color: #ededed;
    color: #494f54;
    padding: 2px 8px;
    cursor: pointer;
    border-radius: 5px;
    line-height: 1;
    font-size: .85rem;    
}

/* accordion */
.accordion-item {
    background-color: #fff;
    border: 1px solid rgba(0,0,0,.125);
}

.accordion-item:last-of-type {
    border-bottom-right-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
}

.accordion-item:first-of-type {
    border-top-left-radius: 0.25rem;
    border-top-right-radius: 0.25rem;
}

.accordion-item:first-of-type .accordion-button {
    border-top-left-radius: calc(0.25rem - 1px);
    border-top-right-radius: calc(0.25rem - 1px);
}

.accordion-item:not(:first-of-type) {
    border-top: 0;
}

.accordion-header {
    margin-bottom: 0;
}

.accordion-button {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    color: #212529;
    text-align: left;
    background-color: #fff;
    border: 0;
    border-radius: 0;
    overflow-anchor: none;
}

.accordion-button:focus {
    z-index: 3;
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgb(13 110 253 / 25%);
}

.accordion-button:not(.collapsed) {
    color: #0c63e4;
    background-color: #e7f1ff;
    box-shadow: inset 0 -1px 0 rgb(0 0 0 / 13%);
}

.accordion-button::after {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    margin-left: auto;
    content: "";
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: 1.25rem;
    transition: transform .2s ease-in-out;
}

.accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230c63e4'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    transform: rotate(-180deg);
}

.accordion-body {
    padding: 1rem 1.25rem;
}

.comentario-anexo {
    padding: 1rem;
    margin-bottom: .25rem;
    width: fit-content;
    border-radius: 1.75rem;
    background: #e6e6e6;
}

.eliminar-comentario {
    opacity: .2;
    height: 100%;
    border: none;
    background: none;
}

.eliminar-comentario:hover,
.comentario-anexo:hover + .eliminar-comentario {
    opacity: 1;
}

.lead-sm {
    font-weight: 300;
    font-size: 1.25em;
}

.alert ul {
    text-align: left;
    margin-bottom: 0;
}

.results {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

img.no-results {
    margin: auto;
    max-width: 512px;
}

.loading-data {
    text-align: center;
    margin-bottom: 3rem;
}

.loading-data img {
    width: 60;
}

.table.align-middle th, 
.table.align-middle td {
    vertical-align: middle;
}

.dashboard {
    font-family: "Roboto", sans-serif !important;
}

.dashboard .bg-light-info {
    background-color: #F8F5FF !important;
}

.dashboard .bg-info {
    background-color: #7239ea !important;
}

.dashboard .bg-light-primary {
    background-color: #F1FAFF !important;
}

.dashboard .bg-primary {
    background-color: #00a3ff !important;
}

.dashboard .bg-light-success {
    background-color: #E8FFF3 !important;
}

.dashboard .bg-success {
    background-color: #50cd89 !important;
}

.dashboard .fw-bolder {
    font-weight: 600;
}

.dashboard .fw-boldest {
    font-weight: 700;
}


.dashboard .table.table-row-dashed tr, 
.kpis .table.table-row-dashed tr {
    border-bottom-width: 2px !important;
    border-bottom-style: dashed !important;
    border-bottom-color: #f4f7fa;
}

.dashboard .table.table-row-dashed th,
.kpis .table.table-row-dashed th {
    border-top-width: 0px !important;

}

.dashboard .table.table-row-dashed tr:last-child,
.kpis .table.table-row-dashed tr:last-child {
    border-bottom: 0 !important;
}

#tabla-usuarios .table td,
#tabla-bajas .table td {
    vertical-align: middle;
}

#tabla-bajas .table td:last-child,
#tabla-bajas .table th:last-child,
#tabla-usuarios .table td:last-child,
#tabla-usuarios .table th:last-child {
    padding-right: .75rem;
}

#tabla-bajas thead th,
#tabla-usuarios thead th {
    cursor: pointer;
}

#tabla-bajas thead th.sorting,
#tabla-usuarios thead th.sorting {
    display: flex;
}

#tabla-bajas thead th.sorting span,
#tabla-usuarios thead th.sorting span {
    width: max-content;
    margin-bottom: 2px;
}

.dashboard .badge-light {
    color: #6c7084 !important;
}

.dashboard .p-3 {
    padding: 0.75rem !important;
}


.tooltip.dashboard.show {
    opacity: 1;
}
 
.tooltip.dashboard .tooltip-inner {
    max-width: 200px;
    padding: 0.75rem 1rem;
    font-size: 0.925rem;
    border-radius: 0.475rem;
  }
  
.tooltip.dashboard .tooltip-inner {
    box-shadow: 0px 0px 30px 2px rgba(82, 63, 105, 0.2);
  }


.dashboard a.badge:focus{
    outline: 0;
}

.dashboard a.badge-light-success:focus,
.dashboard a.badge-light-success:hover {
    color: #328055;
    background-color: #c6ecd8;
}

.dashboard a.badge-light-danger:focus,
.dashboard a.badge-light-danger:hover {
    color: #cc375c;
    background-color: #f4cdd8;
}

a.badge-light,
a.badge-light-success,
a.badge-light-danger {
  transition: background-color .15s ease-in-out;
}

/*
* -------------------------------------------------------------------
*	Deshabilitar a
* -------------------------------------------------------------------
*
*
*/
a.disabled {
    pointer-events: none;
    color: rgb(177, 173, 173);
}


input.check-vivienda ~ .custom-control-label::before {
    width: 2em;
    height: 2em;
}

input.check-vivienda ~ .custom-control-label::after {
    width: 2em;
    height: 2em;
}

input.check-visita ~ .custom-control-label::before {
    width: 2em;
    height: 2em;
}

input.check-visita ~ .custom-control-label::after {
    width: 2em;
    height: 2em;
}

table.orangeTable {
    background-color: #FFFFFF;
    width: 100%;
    height: 100%;
    text-align: center;
    border-collapse: collapse;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    font-family: Mukta, sans-serif;
    justify-content: center;
    align-items: center;
    color: black;
    font-size: 15px;
    border-radius: 1em;
    margin-bottom: 30px;
  }
  table.orangeTable td, table.orangeTable th {
    padding: 3px 2px;
    padding: 1rem 2rem;
  }
  table.orangeTable tbody {
    font-size: 16px;
    display: contents;
  }

  td + td {
    border-left: 0px solid black;
}

  table.orangeTable tr:nth-child(even) {
    background: var(--gris-claro-2);
  }
  table.orangeTable thead {
    background: var(--naranja);
    background: -moz-linear-gradient(top, var(--naranja) 0%, var(--naranja) 66%, var(--naranja) 100%);
    background: -webkit-linear-gradient(top, var(--naranja) 0%, var(--naranja) 66%, var(--naranja) 100%);
    background: linear-gradient(to bottom, var(--naranja) 0%, var(--naranja) 66%, var(--naranja) 100%);
    border-bottom: 1px solid #000000;
    font-style: bold;
    color: white;
  }
  table.orangeTable thead th {
    font-size: 18px;
    font-weight: bold;
    color: var(--blanco);
    text-align: center;
  }

  table.orangeTable thead td {
    font-size: 18px;
    font-weight: bold;
    color: var(--negro);
    text-align: center;
  }

  table.orangeTable thead th:first-child {
    border-left: none;
  }

  table.orangeTable thead th:last-child {
    border-left: none;
  }

  table.orangeTable td:last-child {
    flex: 1;
    width: 100%;
  }
  
  table.orangeTable tfoot {
    font-size: 14px;
    font-weight: bold;
    color: #FFFFFF;
    background: #D0E4F5;
    background: -moz-linear-gradient(top, #f2f6f8 0%, #d4e6f6 66%, #D0E4F5 100%);
    background: -webkit-linear-gradient(top, #dcebf7 0%, #d4e6f6 66%, #D0E4F5 100%);
    background: linear-gradient(to bottom, #dcebf7 0%, #d4e6f6 66%, #D0E4F5 100%);
    border-top: 1px solid #444444;
  }
  table.orangeTable tfoot td {
    font-size: 14px;
  }
  table.orangeTable tfoot .links {
    text-align: right;
  }
  table.orangeTable tfoot .links a{
    display: inline-block;
    background: black;
    color: #FFFFFF;
    padding: 2px 8px;
    border-radius: 5px;
  }

  .status {
    border-radius: 0.1rem;
    background-color: red;
    padding: 0.3rem 1rem;
    text-align: center;
  }
  .status-pending {
    border-radius: 0.1rem;
    padding: 0.3rem 1rem;
    text-align: center;
    background-color: var(--clr-pending);
    color: var(--clr-pending-font);
  }
  .status-paid {
    border-radius: 0.1rem;
    padding: 0.3rem 1rem;
    text-align: center;
    color: var(--a3-blue);
  }

  .status-created {
    border-radius: 0.2rem;
    padding: 0.8rem 1.1rem;
    vertical-align: middle;
    text-align: center;
    background-color: var(--clr-paid);
    color: var(--clr-paid-font);
  }
  .status-unpaid {
    border-radius: 0.1rem;
    padding: 0.3rem 1rem;
    text-align: center;
    color: var(--clr-unpaid-font);
  }
  .tabla-itemcode {
    border-radius: 0.1rem;
    padding: 0.3rem 1rem;
    text-align: center;
    color: var(--a3-blue);
  }

  .tabla-crear {
    border-radius: 0.4rem;
    padding: 0.3rem 1rem;
    text-align: center;
    background-color: var(--clr-paid);
    color: var(--clr-paid-font);
  }

  .rdata tr {
    height: 200px;
  }

  .over {
    color: red;
}

.symbol > .symbol-label.bg-light-success {
    background-color: #E8FFF3;
}

.symbol > .symbol-label.bg-light-danger {
    background-color: #FFF5F8;
}

.symbol > .symbol-label.bg-light-primary {
    background-color: #F1FAFF;
}

.symbol > .symbol-label.bg-light-warning {
    background-color: #ffffe4;
}

.progress-bar-control {
    background-color: #4caf50; /* green */
  }
  
  .progress-bar-contabilidad {
    background-color: #f44336; /* red */
  }
  
  .progress-bar-tesoreria {
    background-color: #ffc107; /* amber */
  }
  
  .progress-bar-cobranza {
    background-color: #2196f3; /* blue */
  }
  
  .progress-bar-comisiones {
    background-color: #9c27b0; /* purple */
  }
  
  @media (min-width: 1400px) {
    .container-custom {
      max-width: 1360px !important;
    }
  }

  @media (max-width: 1400px) {
    .container-custom {
      max-width: 100% !important;
      padding-left: 2px !important;
      padding-right: 2px !important;
    }
  }
  
    
  
  /********************TICKETS********************/
      /* Estilo para diferenciar cada sección */
      .ticket-section {
        background-color: #f8f9fa;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 10px;
    }

       .acuerdo-section {
        background-color: #f8f9fa;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 10px;
    }

    /* Línea de tiempo */
    .timeline-dot {
        height: 8px;
        width: 8px;
        background-color: #d76d2f;
        border-radius: 50%;
        display: inline-block;
        margin-right: 5px;
    }

    /* Caja de chat */
    .chat-box {
        word-wrap: break-word; /* Ajusta palabras largas */
        line-height: 1.4; /* Ajuste más compacto */
        font-family: Arial, sans-serif; /* Fuente estándar */
        background-color: #f9f9f9; /* Fondo más claro para el chat */
        padding: 10px;
        border-radius: 5px;
        border: 1px solid #e0e0e0;
    }

    /* Contenedor de mensajes */
    .message-container {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 2px; /* Espacio reducido entre mensajes */
        padding: 8px; /* Ajuste de relleno */
        border-radius: 8px;
        background-color: #ffffff;
        border: 1px solid #e0e0e0;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); /* Sombra ligera */
    }

    /* Mensajes del usuario */
    .message-container strong {
        font-size: 14px;
        font-weight: bold;
        color: #002251;
        margin-bottom: 4px; /* Espacio reducido entre el nombre y el mensaje */
    }

    /* Texto del mensaje */
    .message-container span {
        font-size: 14px;
        color: #333;
    }

    /* Fecha del mensaje */
    .message-container small {
        font-size: 12px;
        color: #888;
        margin-top: 4px;
        align-self: flex-end; /* Alinea a la derecha */
    }

    /* Listas en mensajes */
    .chat-box ul, .chat-box ol {
        margin-left: 20px;
        padding-left: 20px;
    }

    .chat-box ul {
        list-style-type: disc;
    }

    .chat-box ol {
        list-style-type: decimal;
    }

    /* Código en mensajes */
    .chat-box code {
        background-color: #e7f3ff;
        padding: 2px 4px;
        border-radius: 4px;
        font-family: monospace;
        font-size: 13px;
        color: #d76d2f;
    }

    /* Bloques de código */
    .chat-box pre {
        background-color: #e7f3ff;
        padding: 10px;
        border-radius: 4px;
        overflow-x: auto;
        font-family: monospace;
        font-size: 13px;
        color: #4d4d4f;
        margin-bottom: 8px;
    }

    /* Links */
    .chat-box a {
        color: #007bff;
        text-decoration: underline;
    }

    .chat-box a:hover {
        color: #0056b3;
        text-decoration: none;
    }

    /* Mensajes del usuario */
    .message-container.user-message {
        background-color: #f5f5f5;
    }

    /* Mensajes del sistema */
    .message-container.system-message {
        background-color: #ffefc2;
        font-style: italic;
    }

    /* Mensajes del usuario (alineados a la derecha y fondo naranja) */
    .message-container.user-message {
        background-color: #fff7f0; /* Fondo naranja */
        align-self: flex-end; /* Alineación a la derecha */
        border: 1px solid #ab492e; /* Bordes más oscuros */
    }

    .message-container.user-message small {
        color: #a9540d;
    }

    #quill-comentarios {
        border: 1px solid #ced4da; /* Borde similar al de otros campos */
        border-radius: 4px;        /* Bordes redondeados */
        background-color: #fff;    /* Fondo blanco */
        padding: 5px;              /* Espaciado interno */
    }
    .ql-toolbar {
        border: 1px solid #ced4da; /* Borde para la barra de herramientas */
        border-bottom: none;       /* Sin borde inferior para unir con el editor */
        border-radius: 4px 4px 0 0; /* Bordes redondeados en la parte superior */
    }
    .ql-container {
        border: 1px solid #ced4da; /* Borde para el contenedor del texto */
        border-radius: 0 0 4px 4px; /* Bordes redondeados en la parte inferior */
        font-size: 14px;           /* Tamaño de fuente */
        min-height: 150px;         /* Altura mínima */
    }

    
/* Utilidades */
.text-naranja { color: #FF6A1A !important; }

.badge-soft-info {
    color: #055160;
    background: #cff4fc;
    border: 1px solid #b6effb;
}

/* Badge Status (usado en ficha proyecto) */
.badge-status {
    padding: .45rem 1rem;
    font-weight: 600;
    border-radius: 9999px;
    line-height: 1;
}

/* Overrides para badges outline transparentes */
.badge-outline-success.bg-transparent { background: transparent; }
.badge-outline-warning.bg-transparent { background: transparent; }
.badge-outline-primary.bg-transparent { background: transparent; }
.badge-outline-secondary.bg-transparent { background: transparent; }
.badge-outline-danger.bg-transparent { background: transparent; }

/* Botón Excel tipo Ghost */
.btn-excel-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #f3f4f6;
    color: #374151;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all .15s ease;
}

.btn-excel-ghost:hover {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
    text-decoration: none;
}


/* ==========================================================================
   DASHBOARD CARDS
   ========================================================================== */

.dash-card-final, .dash-card-proceso, .dash-card-fix, .dash-card-demanda,
.dash-card-bajas, .dash-card-recup, .dash-card-remodel, .donut-card,
.dash-card-inv, .dash-card-tren {
    background-color: #fff !important;
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075) !important;
    border-radius: 14px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dash-body-final, .dash-body-proceso, .dash-body-fix, .dash-body-demanda,
.dash-body-bajas, .donut-body, .dash-body-inv, .dash-body-tren {
    padding: 12px;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Clave para el scroll interno */
}

.dash-top-final, .dash-top-proceso, .dash-top-fix, .dash-top-demanda,
.dash-top-bajas, .donut-top, .dash-top-inv, .dash-top-tren {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    flex-shrink: 0;
}

.dash-title-final, .dash-title-proceso, .dash-title-fix, .dash-title-demanda,
.dash-title-bajas, .donut-title, .dash-title-inv, .dash-title-tren {
    color: #f35f06;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.1;
}

.dash-table-final, .dash-table-proceso, .dash-table-fix, .dash-table-demanda,
.dash-table-bajas, .dash-table, .dash-table-inv, .dash-table-tren {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.dash-list-final, .dash-list-proceso, .dash-list-fix, .dash-list-bajas,
.dash-list-demanda, .dash-list, .dash-list-inv, .dash-list-tren {
    flex: 1 1 auto;
    overflow-y: auto;
    padding-right: 6px;
    min-height: 0;
}

/* Bordes entre items de lista */
.dash-list-final > .d-flex, .dash-list-proceso > .d-flex, .dash-list-fix > .d-flex,
.dash-list-bajas > .d-flex, .dash-list-inv > .d-flex, .dash-list-tren > .d-flex {
    border-bottom: 1px solid #eef0f4;
}

.dash-list-final > .d-flex:last-child, .dash-list-proceso > .d-flex:last-child,
.dash-list-fix > .d-flex:last-child, .dash-list-bajas > .d-flex:last-child,
.dash-list-inv > .d-flex:last-child, .dash-list-tren > .d-flex:last-child {
    border-bottom: none;
}

/* Demanda (tabla interna) */
.dash-list-demanda table { width: 100%; }
.dash-list-demanda td { border-top: 1px solid #eef0f4; padding: 0.5rem 0; }
.dash-list-demanda tr:first-child td { border-top: none; }


/* ==========================================================================
   TABLAS ESPECIALES 
   ========================================================================== */

.table-scroll-wrapper,
.table-scroll-wrapper-remodel {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    padding-right: 2px;
}

.kv-rec-table-fixed,
.kv-table-fixed-remodel {
    width: 100%;
    table-layout: fixed;
    font-size: 13px;
    border-collapse: separate;
    border-spacing: 0;
}

.kv-rec-table-fixed thead th,
.kv-table-fixed-remodel thead th {
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 2;
    box-shadow: 0 1px 0 #e5e7eb;
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
    border-top: 0;
    border-bottom: 0;
    padding: 6px 10px;
    white-space: nowrap;
}

.kv-rec-table-fixed tbody td,
.kv-table-fixed-remodel tbody td {
    padding: 7px 10px;
    border-top: 0;
    border-bottom: 1px solid #eef0f4;
    vertical-align: middle;
}

/* Columnas específicas */
.kv-rec-table-fixed .col-name   { width: 33%; }
.kv-rec-table-fixed .col-num    { width: 13%; }
.kv-rec-table-fixed .col-money  { width: 20%; }
.kv-rec-table-fixed .col-money2 { width: 22%; }

.kv-col-contratista { width: 40%; }
.kv-col-num         { width: 13%; }
.kv-col-days        { width: 15%; }

/* Truncamiento de texto */
.kv-rec-table-fixed tbody td:first-child,
.kv-table-fixed-remodel tbody td:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Alineación de números */
.kv-rec-table-fixed tbody td:not(:first-child),
.kv-table-fixed-remodel tbody tr:not(.kv-total-row) td:not(:first-child) {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
}

/* Fila de totales */
.kv-total-row td,
.kv-rec-table-fixed tbody tr.kv-total-row td {
    border-top: 2px solid #d1d5db;
    padding-top: 8px;
    padding-bottom: 8px;
}

.kv-total-row td:first-child,
.kv-rec-table-fixed tbody tr.kv-total-row td:first-child { font-weight: 700; }

.kv-total-row td.kv-total-num,
.kv-rec-table-fixed tbody tr.kv-total-row td.kv-total-num { font-weight: 700; text-align: right; }


/* ==========================================================================
   WIDGET: DONUT CHART
   ========================================================================== */

.donut-top { margin-bottom: 4px; }

.donut-area {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 0;
}

.donut-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.82rem;
    margin-top: 2px;
    padding-top: 2px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.legend-swatch {
    display: inline-block;
    width: 14px;
    height: 10px;
    border-radius: 3px;
}

.sw-baja { background: #c92a2a; }
.sw-tren { background: #364fc7; }
.sw-inv  { background: #e67700; }
.sw-ven  { background: #2b8a3e; }


/* ==========================================================================
   SCROLLBARS PERSONALIZADOS
   ========================================================================== */

.dash-list-final::-webkit-scrollbar,
.dash-list-proceso::-webkit-scrollbar,
.dash-list-fix::-webkit-scrollbar,
.dash-list-bajas::-webkit-scrollbar,
.dash-list-demanda::-webkit-scrollbar,
.dash-list::-webkit-scrollbar,
.table-scroll-wrapper::-webkit-scrollbar,
.table-scroll-wrapper-remodel::-webkit-scrollbar,
.dash-list-inv::-webkit-scrollbar,
.dash-list-tren::-webkit-scrollbar { width: 6px; }

.dash-list-final::-webkit-scrollbar-thumb,
.dash-list-proceso::-webkit-scrollbar-thumb,
.dash-list-fix::-webkit-scrollbar-thumb,
.dash-list-bajas::-webkit-scrollbar-thumb,
.dash-list-demanda::-webkit-scrollbar-thumb,
.dash-list::-webkit-scrollbar-thumb,
.table-scroll-wrapper::-webkit-scrollbar-thumb,
.table-scroll-wrapper-remodel::-webkit-scrollbar-thumb,
.dash-list-inv::-webkit-scrollbar-thumb,
.dash-list-tren::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 6px;
}

.dash-list-final::-webkit-scrollbar-track,
.dash-list-proceso::-webkit-scrollbar-track,
.dash-list-fix::-webkit-scrollbar-track,
.dash-list-bajas::-webkit-scrollbar-track,
.dash-list-demanda::-webkit-scrollbar-track,
.dash-list::-webkit-scrollbar-track,
.table-scroll-wrapper::-webkit-scrollbar-track,
.table-scroll-wrapper-remodel::-webkit-scrollbar-track,
.dash-list-inv::-webkit-scrollbar-track,
.dash-list-tren::-webkit-scrollbar-track { background: transparent; }


/* ==========================================================================
   METAS DE PROYECTO & DASHBOARD LAYOUT
   ========================================================================== */

.projects-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
    font-weight: 600;
    font-size: .9rem;
    color: #f35f06;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: .5rem;
    margin-bottom: .8rem;
}

/* header: Proyecto | Metas | Objetivo | Tendencia */
.projects-header{
  align-items: center;
}
.projects-header > div{
  align-self: center;
}

/* centra columnas específicas */
.projects-header .col-metas,
.projects-header .col-objetivo{
  text-align: center;
}

.projects-header .col-tendencia{
  text-align: right; /* si quieres tendencia pegado a la derecha */
}

.project-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;
    padding: .6rem 0;
    align-items: center;
    border-bottom: 1px dashed #e5e7eb;
}

.project-row:last-child { border-bottom: none; }

.project-row .num, .projects-header .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Responsive table */
@media (max-width: 900px) {
    .projects-header { display: none; }
    .project-row {
        grid-template-columns: 1fr;
        row-gap: .35rem;
        padding: 1rem;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 1px 4px rgba(0,0,0,.04);
        margin-bottom: .8rem;
    }
    .project-row .proj-name {
        font-weight: 600;
        margin-bottom: .25rem;
        color: #111827;
    }
    .project-row > [data-label] {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }
    .project-row > [data-label]::before {
        content: attr(data-label);
        color: #6b7280;
        font-weight: 500;
    }
    .projects-card { padding: 1rem; border-radius: 12px; }
}


/* Dashboard grid system */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
    width: 100%;
}

.dash-grid .tile { height: 420px; }

.auto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    align-items: stretch;
}

.grid-3cards .tile { height: 450px; }

.grid-bottom .tile {
    height: 450px;
    overflow: hidden;
}

/* Responsive grids */
@media (max-width: 1400px) { .dash-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 820px)  { .dash-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 400px)  { .auto-grid { grid-template-columns: 1fr; } }


/* Tiles & containers */
.tile {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    min-height: 260px;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.tile .card {
    background-color: #fff !important;
    border: 1px solid #eef0f4 !important;
    border-radius: 14px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.05) !important;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.tile-fill {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    display: flex;
}
.tile-fill > .card {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}

.tile .card-header, .tile .card-footer { background: transparent; border: 0; padding: 0 0 8px 0; }
.tile .container { max-width: none !important; width: 100% !important; padding: 0 !important; margin: 0 !important; }
.tile .row { margin: 0 !important; }
.tile [class^="col-"], .tile [class*=" col-"] { padding-left: 0 !important; padding-right: 0 !important; }
.tile .table { width: 100%; }

/* Widget skeleton (loading state) */
.widget-skeleton {
    border: 1px solid #eef0f4;
    border-radius: 12px;
    background: #fff;
    color: #6c757d;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: .95rem;
}


/* Filtros personalizados (Custom Selects) */
.filters-row { display: flex; flex-wrap: wrap; gap: .5rem; }

.kv-select-wrapper { position: relative; z-index: 100; }
.dashboard-filter { min-width: 140px; max-width: 200px; width: auto; }

.kv-select-display {
    padding: .4rem 1.2rem;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    font-weight: 600;
    font-size: 0.85rem;
    color: #374151;
    text-align: left;
    background: #fff;
    cursor: pointer;
    transition: all .2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.kv-select-display:hover {
    border-color: #ff6a1a;
    color: #ff6a1a;
    background-color: #fffaf5;
}

.kv-select-options {
    position: absolute;
    top: 115%;
    left: 0;
    min-width: 100%;
    width: max-content;
    max-width: 350px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 25px rgba(0,0,0,.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000 !important;
}

.kv-select-options .opt {
    padding: .5rem 1rem;
    cursor: pointer;
    text-align: left;
    font-size: 0.9rem;
    color: #4b5563;
    transition: all .15s;
    border-bottom: 1px solid #f3f4f6;
}

.kv-select-options .opt:last-child { border-bottom: none; }
.kv-select-options .opt:hover, .kv-select-options .opt.selected {
    background: #ff6a1a; color: #fff; font-weight: 600;
}
.kv-select-options::-webkit-scrollbar { width: 6px; }
.kv-select-options::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }


/* Acordeón de Proyectos */
.projects-wrap { position: relative; }
.projects-collapsed { max-height: 320px; overflow: hidden; }
.projects-expanded { max-height: none; overflow: visible; }

.projects-scroll-hint {
    position: absolute; left: 50%; bottom: -25px; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .25s ease, bottom .25s ease; cursor: pointer;
    z-index: 5; background: transparent; border: none; outline: none; padding: 0;
    width: 40px; height: 40px;
}

.projects-card.projects-collapsed ~ .projects-scroll-hint,
.projects-card.projects-expanded ~ .projects-scroll-hint { opacity: 1; }

.projects-scroll-hint .arrow {
    font-size: 20px; color: rgba(243,95,6, 0.6); margin-top: -2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform .3s ease, opacity .2s ease;
    animation: bounceDown 1.6s infinite;
}

.projects-scroll-hint .arrow:nth-child(2) { animation-delay: .2s; opacity: 0.5; }
.projects-scroll-hint:hover .arrow { opacity: 1; color: #f35f06; }

.projects-expanded ~ .projects-scroll-hint .arrow {
    margin-top: 0px;
    animation: bounceUp 1.6s infinite;
}

@keyframes bounceDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

@keyframes bounceUp {
    0%, 100% { transform: rotate(180deg) translateY(0); }
    50% { transform: rotate(180deg) translateY(5px); }
}


/* ==========================================================================
   DATOS DE VIVIENDA
   ========================================================================== */

.kv-sep {
  border-color: rgba(0,0,0,.08);
  margin: .75rem 0 1rem;
}

/* Card principal */
.kv-card {
  border: 1px solid rgba(0,0,0,.06);
  border-radius: var(--radio-borde);
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.03);
  margin-bottom: 1rem;
  padding: 0;
}

.kv-card .kv-title {
  font-weight: 700;
  font-size: .95rem;
  color: #374151;
  text-align: center;
  margin: 1.5rem 0;
}

/* Ajustes para Bootstrap en esta vista */
.card.p-3, .card.button.p-3 { padding: 0.8rem !important; }
.card-body { padding-top: 0.6rem; padding-bottom: 0.6rem; }

.row.row-cols-md-2 { margin-left: -0.5rem; margin-right: -0.5rem; }
.row.row-cols-md-2 > [class*="col"] { padding-left: 0.5rem; padding-right: 0.5rem; }

@media (min-width: 768px) {
  .row.row-cols-md-2 { margin-left: -0.25rem; margin-right: -0.25rem; }
  .row.row-cols-md-2 > [class*="col"] { padding-left: 0.25rem; padding-right: 0.25rem; }
}


/* Sistema de rejilla */
.dl-grid, .form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem 1rem;
  padding: 0 1.5rem 2rem 1.5rem;
}

.dl-item, .kv-card .fg {
  background: #fafafa;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: var(--radio-borde);
  padding: .65rem .8rem;
  min-height: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background-color 0.2s;
}

.kv-card .fg:focus-within {
  border-color: var(--naranja-brand);
  background: #fff;
}

@media (max-width: 767.98px) {
  .dl-grid, .form-grid-2 { grid-template-columns: 1fr; }
  .fg.fg-span2 { grid-column: span 1; }
}


/* Tipografía e inputs */
.dl-term, .kv-card .fg label {
  margin: 0 0 .3rem 0 !important;
  font-weight: 700 !important;
  font-size: .84rem !important;
  color: var(--texto-secundario) !important;
  text-transform: none;
  letter-spacing: 0.3px;
  background: transparent !important;
}

/* Override global para labels en vivienda */
.vivienda label, .vivienda .label { background: transparent !important; }

.dl-desc,
.kv-card .fg .form-control,
.kv-card .form-control-lg {
  font-size: .98rem !important;
  font-weight: 600 !important;
  color: var(--texto-principal) !important;
  line-height: 1.25;
  text-align: center;
  width: 100%;
}

.fw-600 { font-weight: 600; }

/* Inputs ghost */
.kv-card .fg .form-control {
  background: transparent;
  border: none;
  box-shadow: none !important;
  padding: .2rem .25rem;
  height: auto;
}
.kv-card .fg .form-control::placeholder { opacity: .5; text-align: center; }
.kv-card .fg .form-control:focus { outline: none !important; }
.kv-card .fg select.form-control { appearance: none; -webkit-appearance: none; text-align-last: center; cursor: pointer; }
.kv-card .fg input[type="date"] { text-align: center; }

/* Botones y alertas */
.kv-card .btn.btn-naranja { border-radius: 12px; font-weight: 700; }
.kv-card .alert { border-radius: 12px; padding: .6rem .8rem; }


/* Avance global y donuts */
.avance-global-wrapper { margin-top: .25rem; margin-bottom: 1.25rem; padding: 0 1.25rem; }
.gp-track { width:100%; height:22px; background:#fff2e8; border-radius:999px; position:relative; overflow:hidden; box-shadow:inset 0 1px 3px rgba(0,0,0,.08); }
.gp-fill { height:100%; background:linear-gradient(90deg,#ff944d,#ff6a1a); width:0%; border-radius:999px; display:flex; align-items:center; justify-content:flex-end; transition:width .8s cubic-bezier(.25,1,.5,1); position:relative; }
.gp-label { position:absolute; right:12px; font-weight:700; font-size:.95rem; color:#fff; text-shadow:0 1px 2px rgba(0,0,0,.25); pointer-events:none; }
.gp-fill[data-small="true"] .gp-label { color:#ff6a1a; text-shadow:none; right:-45px; }

.kd-donut { --col:#22c55e; width:120px; height:120px; position:relative; display:inline-block; }
.kd-svg { width:100%; height:100%; transform:rotate(-90deg); }
.kd-track { fill:none; stroke:#e9ecef; stroke-width:14; }
.kd-arc { fill:none; stroke:var(--col); stroke-width:14; stroke-linecap:round; stroke-dasharray:0 999; stroke-dashoffset:0; transition:stroke-dashoffset .9s ease, stroke .3s ease, filter .2s; }
.kd-donut:hover .kd-arc { filter:drop-shadow(0 2px 4px rgba(0,0,0,.15)); }
.kd-center { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:1rem; color:var(--col); user-select:none; }
.avance-label { font-size:.85rem; letter-spacing:.03em; color:#223; }


/* Tablas (overrides vista vivienda) */
.table-card thead th { background: #fafafa; border-bottom: 1px solid #eee !important; color: #475569; font-weight: 700; }
.table-border-soft tbody tr td { border-top: 1px solid rgba(0,0,0,.05); }
.tr-click { cursor: pointer; }
.tr-click:hover { background: #fff7f1; }


/* Custom switch (toggle) */
.custom-switch {
  padding-left: 3.5rem;
  min-height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.custom-switch .custom-control-label::before {
  left: -3.5rem; width: 3rem; height: 1.6rem;
  border-radius: 50rem;
  background-color: #e5e7eb;
  border: 1px solid #d1d5db;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.custom-switch .custom-control-label::after {
  top: calc(0.16rem + 2px);
  left: calc(-3.5rem + 4px);
  width: 1.35rem; height: 1.35rem;
  background-color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.custom-switch .custom-control-input:checked ~ .custom-control-label::before {
  background-color: var(--naranja-brand);
  border-color: var(--naranja-brand);
}

.custom-switch .custom-control-input:checked ~ .custom-control-label::after {
  transform: translateX(1.4rem);
}

.custom-switch .custom-control-input:focus ~ .custom-control-label::before {
  box-shadow: 0 0 0 0.2rem rgba(255, 106, 26, 0.25);
}

.custom-switch .custom-control-label { padding-top: 2px; cursor: pointer; }


/* ==========================================================================
   OVERRIDES DE EMERGENCIA 
   ========================================================================== */

/* Filtros (cápsulas compactas y menú opaco) */
.filters-row {
    display: flex !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    margin-left: 2px;
}

.kv-select-wrapper {
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
}

.kv-select-wrapper .kv-select-display {
    border-radius: 50px !important;
    background: #fff !important;
    border: 1px solid #eef0f4 !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03) !important;
    padding: 5px 15px !important;
    min-width: 160px !important;
    height: auto !important;
    font-size: 0.85rem !important;
    color: #4b5563 !important;
    font-weight: 500 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.kv-select-wrapper .kv-select-display:hover {
    border-color: #e2e8f0 !important;
    box-shadow: 0 3px 8px rgba(0,0,0,0.06) !important;
    transform: translateY(-1px);
}

.kv-select-wrapper .kv-select-display i {
    font-size: 0.7rem !important;
    margin-left: 10px !important;
    color: #9ca3af !important;
}

/* Menú desplegable (fondo blanco forzado) */
.kv-select-options {
    background-color: #ffffff !important;
    border: 1px solid #eee !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
    border-radius: 12px !important;
    z-index: 99999 !important;
    margin-top: 5px !important;
    padding: 5px 0 !important;
    min-width: 100% !important;
    width: max-content !important;
}

.kv-select-options .opt {
    padding: 8px 15px !important;
    text-align: left !important;
    color: #4b5563 !important;
    border-bottom: 1px solid #f9f9f9 !important;
    font-size: 0.9rem !important;
    background-color: #ffffff !important;
}

.kv-select-options .opt:hover {
    background-color: #fff3e0 !important;
    color: #FF6A1A !important;
}


/* Cards de acción vivienda (horizontales y compactas) */
.row.row-cols-md-2 .card {
    min-height: auto !important;
    height: auto !important;
    background-color: #fff !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
}

.row.row-cols-md-2 .card .card-body {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: left !important;
    padding: 0.8rem 1rem !important;
    gap: 12px !important;
}

.row.row-cols-md-2 .card svg {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    color: #FF6A1A !important;
    margin: 0 !important;
}

.row.row-cols-md-2 .card .flex-grow-1 { width: 100%; text-align: left !important; }

.row.row-cols-md-2 .card h5 {
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin: 0 !important;
    line-height: 1.1;
}

.row.row-cols-md-2 .card p.text-muted {
    font-size: 0.75rem !important;
    color: #6b7280 !important;
    margin-bottom: 2px !important;
    line-height: 1;
}

.row.row-cols-md-2 .card.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08) !important;
}


/* Tabs / pestañas (cápsulas naranjas) */
.nav-pills {
    justify-content: center;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.nav-pills .nav-link {
    border-radius: 50px !important;
    padding: 8px 20px !important;
    font-weight: 500;
    font-size: 0.95rem;
    color: #64748b !important;
    background-color: transparent !important;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.nav-pills .nav-link:hover {
    color: #FF6A1A !important;
    background-color: rgba(255, 106, 26, 0.05) !important;
}

.nav-pills .nav-link.active {
    background-color: #FF6A1A !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(255, 106, 26, 0.3);
}

/* AG Grid customization */
.ag-theme-alpine {
    --ag-header-background-color: #f8f9fa;
    --ag-header-foreground-color: #1E293B;
    --ag-odd-row-background-color: #ffffff;
    --ag-row-hover-color: #fff5f0;
    --ag-selected-row-background-color: #ffe5d9;
    --ag-range-selection-background-color: #ffe5d9;
    --ag-range-selection-border-color: #FF6A1A;
}

.ag-theme-alpine .ag-header-cell-label {
    font-weight: 600;
}

.ag-theme-alpine .ag-cell {
    display: flex;
    align-items: center;
}

.ag-theme-alpine .badge {
    font-size: 0.75rem;
    padding: 0.25em 0.6em;
}

.ag-theme-alpine .btn-xs {
    padding: 0.15rem 0.4rem;
    font-size: 0.75rem;
}

/* ========================================
   COMPROBACIONES INDEX MODERNIZATION
   ======================================== */

/* Hero Section */
.hero-comprobaciones {
    background: linear-gradient(135deg, #fff7f0 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 3rem 2rem;
    margin-top: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    color: #002251;
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.hero-cta {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    transition: all 0.3s ease;
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

.hero-tip {
    font-size: 0.9rem;
    opacity: 0.8;
}

.hero-icon {
    opacity: 0.15;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Quick Access Cards */
.quick-access-card {
    border: 1px solid #e1e5ee;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
}

.quick-access-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    border-color: var(--a3-orange);
}

.quick-icon {
    display: inline-block;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.quick-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #002251;
    margin-bottom: 0.5rem;
}

.quick-description {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.quick-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    font-weight: 600;
}

.quick-amount {
    font-size: 1.3rem;
    margin-top: 0.5rem;
}

/* Admin Cards */
.admin-card {
    border: 1px solid #e1e5ee;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.admin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    border-color: #007bff;
}

.admin-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 12px;
    display: flex;
}

.icon-circle {
    width: 44px;
    height: 44px;
    border: 1px solid #E0E0E0;
    border-radius: 50%;
}

/* ======================================================================
   1. KPI CARDS
   ====================================================================== */
.metas-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

/* Responsividad */
@media (max-width: 1200px) { .metas-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px)  { .metas-kpi-grid { grid-template-columns: 1fr; } }

.metas-kpi-card {
    background: #fff;
    border: 1px solid #eef0f4;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
    padding: 18px;
    min-height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.metas-kpi-card > div { width: 100%; }

/* Contenido Interno KPI */
.kpi {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    text-align: center;
}

.kpi-pill {
    padding: 8px 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}

.kpi-value {
    font-size: 44px;
    font-weight: 800;
    line-height: 2;
}

@media (max-width: 576px) { .kpi-value { font-size: 34px; } }

/* Colores de KPI */
.kpi--objetivo .kpi-pill { background: rgba(37,99,235,.10); color: #2563eb; }
.kpi--objetivo .kpi-value { color: #2563eb; }

.kpi--vendida .kpi-pill { background: rgba(16,185,129,.12); color: #059669; }
.kpi--vendida .kpi-value { color: #059669; }

.kpi--pendiente .kpi-pill { background: rgba(107,114,128,.10); color: #6b7280; }
.kpi--pendiente .kpi-value { color: #6b7280; }

.kpi--cumplimiento .kpi-pill { background: rgba(243,95,6,.12); color: #f35f06; }
.kpi--cumplimiento .kpi-value { color: #f35f06; }


/* ======================================================================
   2. GRID DE PROYECTOS
   ====================================================================== */

.projects-row, 
.projects-header,
.projects-3col,
.projects-4col {
    display: grid;
    gap: 18px;
    align-items: center;
    width: 100%;
}

.projects-4col, .projects-row {
    grid-template-columns: 1.2fr minmax(400px, 3fr) 0.7fr 0.9fr;
}

.projects-3col {
    grid-template-columns: 1.2fr 2.4fr 0.55fr 0.9fr;
}

.th-center, .td-center, .td-obj, .td-trend { text-align: center; }

.trend-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.admin-card h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #002251;
}

.admin-card .badge {
    font-size: 0.75rem;
}

/* Expandable Menu */
.collapse-indicator {
    transition: transform 0.3s ease;
}

.collapse-indicator.collapsed {
    transform: rotate(-90deg);
}

.list-group-item-action {
    cursor: pointer;
    transition: all 0.2s ease;
}

.list-group-item-action:hover {
    background-color: #f8f9fa;
    border-left: 3px solid var(--a3-orange);
    padding-left: calc(1.25rem - 3px);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-comprobaciones {
        padding: 2rem 1.5rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-cta {
        width: 100%;
        text-align: center;
    }

    .quick-access-card {
        margin-bottom: 1rem;
    }

    .quick-icon {
        width: 60px;
        height: 60px;
    }

    .admin-icon {
        width: 50px;
        height: 50px;
    }
}

@media (min-width: 1200px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }
}

/* Accessibility */
.quick-access-card:focus,
.admin-card:focus {
    outline: 2px solid var(--a3-orange);
    outline-offset: 2px;
}

/* Loading State */
.quick-access-card.loading,
.admin-card.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Badge Variations */
.badge-pill.quick-badge {
    border-radius: 50px;
}

/* Section Headings */
.contenido h4 {
    font-weight: 600;
    color: #002251;
    position: relative;
    padding-bottom: 0.5rem;
}

.contenido h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--a3-orange) 0%, transparent 100%);
    border-radius: 2px;
}

/* ========================================
   BALANCE COMPONENT MODERNIZATION
   ======================================== */

/* Balance Metric Cards */
.balance-metric-card {
    border: 1px solid #e1e5ee;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.balance-metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.balance-metric-card:hover::before {
    opacity: 1;
}

.balance-metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.balance-card-pending {
    border-left: 3px solid var(--clr-pending-font);
    color: var(--clr-pending-font);
}

.balance-card-success {
    border-left: 3px solid var(--a3-green);
    color: var(--a3-green);
}

.balance-card-info {
    border-left: 3px solid #007bff;
    color: #007bff;
}

.balance-card-primary {
    border-left: 3px solid var(--clr-primary-dark);
    color: var(--clr-primary-dark);
}

.balance-card-accent {
    border-left: 3px solid var(--a3-orange);
    color: var(--a3-orange);
}

/* Balance Icon */
.balance-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.balance-metric-card:hover .balance-icon {
    transform: scale(1.1);
}

.balance-icon-pending {
    background: linear-gradient(135deg, #fff8e1 0%, #fff0c2 100%);
}

.balance-icon-success {
    background: linear-gradient(135deg, #f1f8f4 0%, #e8fff3 100%);
}

.balance-icon-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.balance-icon-primary {
    background: linear-gradient(135deg, #e1f5fe 0%, #b3e5fc 100%);
}

.balance-icon-accent {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
}

/* Balance Amounts */
.balance-amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: #002251;
    line-height: 1.2;
}

.balance-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Balance Progress Card */
.balance-progress-card {
    border: 1px solid #e1e5ee;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.balance-percentage {
    font-size: 2rem;
    font-weight: 700;
    color: var(--a3-green);
    line-height: 1;
}

.balance-progress-bar {
    height: 28px;
    border-radius: 14px;
    background-color: var(--clr-gray150);
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}

.balance-progress-bar .progress-bar {
    transition: width 1s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

/* Balance Chart Card */
.balance-chart-card,
.balance-summary-card {
    border: 1px solid #e1e5ee;
    border-radius: 12px;
}

.balance-chart-container {
    position: relative;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Balance Summary */
.balance-summary-list {
    padding: 0;
}

.balance-summary-item {
    padding: 0.5rem 0;
}

.balance-summary-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.balance-summary-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.balance-summary-value {
    font-size: 1rem;
    font-weight: 700;
    color: #002251;
}

.balance-mini-progress {
    height: 6px;
    border-radius: 3px;
    background-color: var(--clr-gray150);
}

.balance-mini-progress .progress-bar {
    transition: width 0.6s ease;
}

/* Responsive Adjustments for Balance */
@media (max-width: 768px) {
    .balance-amount {
        font-size: 1.5rem;
    }

    .balance-percentage {
        font-size: 1.5rem;
    }

    .balance-chart-container {
        height: 220px;
    }

    .balance-icon {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 576px) {
    .balance-metric-card {
        margin-bottom: 0.75rem;
    }

    .balance-chart-container {
        height: 200px;
    }
}

/* Animation for balance cards on load */
@keyframes balanceFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.balance-metric-card {
    animation: balanceFadeIn 0.5s ease-out;
}

.balance-metric-card:nth-child(1) {
    animation-delay: 0.1s;
}

.balance-metric-card:nth-child(2) {
    animation-delay: 0.2s;
}

.balance-metric-card:nth-child(3) {
    animation-delay: 0.3s;
}

.balance-metric-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Balance Envíos Pendientes */
.balance-envios-list {
    max-height: 400px;
    overflow-y: auto;
}

.balance-envio-item {
    padding: 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    background: #f8f9fa;
    border-left: 3px solid #dee2e6;
    transition: all 0.3s ease;
    cursor: pointer;
}

.balance-envio-item:hover {
    background: #e9ecef;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.balance-envio-item:last-child {
    margin-bottom: 0;
}

.balance-envio-critico {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.balance-envio-critico:hover {
    background: #ffe8e8;
}

.balance-envio-advertencia {
    border-left-color: #ffc107;
    background: #fff8e1;
}

.balance-envio-advertencia:hover {
    background: #fff3cd;
}

.balance-envios-empty {
    padding: 2rem 1rem;
}

.balance-envios-list::-webkit-scrollbar {
    width: 6px;
}

.balance-envios-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.balance-envios-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.balance-envios-list::-webkit-scrollbar-thumb:hover {
    background: #999;
}


/* ========================================
   ADMIN PANEL METRICS - CONTABILIDAD/TESORERÍA
   ======================================== */

/* Alertas Críticas */
.admin-alert-critical {
    border-left: 5px solid #dc3545;
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.15);
}

.admin-alert-critical .alert-heading {
    color: #dc3545;
    font-size: 1.1rem;
}

.admin-alert-critical ul {
    list-style: none;
    padding-left: 0;
}

.admin-alert-critical li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(220, 53, 69, 0.1);
}

.admin-alert-critical li:last-child {
    border-bottom: none;
}

/* Admin Metric Cards */
.admin-metric-card {
    border: 1px solid #e1e5ee;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.admin-metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.admin-metric-card:hover::before {
    opacity: 1;
}

.admin-metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Variantes de color */
.admin-card-warning {
    border-left: 3px solid #ffc107;
    color: #ffc107;
}

.admin-card-info {
    border-left: 3px solid #17a2b8;
    color: #17a2b8;
}

.admin-card-danger {
    border-left: 3px solid #dc3545;
    color: #dc3545;
}

.admin-card-secondary {
    border-left: 3px solid #6c757d;
    color: #6c757d;
}

.admin-card-success {
    border-left: 3px solid #28a745;
    color: #28a745;
}

.admin-card-primary {
    border-left: 3px solid #007bff;
    color: #007bff;
}

/* Admin Metric Icon */
.admin-metric-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.admin-metric-card:hover .admin-metric-icon {
    transform: scale(1.1);
}

.admin-icon-warning {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
}

.admin-icon-info {
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
}

.admin-icon-danger {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
}

.admin-icon-secondary {
    background: linear-gradient(135deg, #f5f5f5 0%, #eeeeee 100%);
}

.admin-icon-success {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.admin-icon-primary {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

/* Admin Metric Text */
.admin-metric-count {
    font-size: 2.5rem;
    font-weight: 700;
    color: #002251;
    line-height: 1;
}

.admin-metric-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-metric-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: #28a745;
}

.admin-metric-link {
    font-size: 0.85rem;
    color: var(--clr-link);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.admin-metric-link:hover {
    color: var(--a3-orange);
    text-decoration: none;
}

/* Panel de Desglose por Plaza */
.admin-desglose-card {
    border: 1px solid #e1e5ee;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.admin-plaza-item {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e1e5ee;
    transition: all 0.2s ease;
    cursor: pointer;
}

.admin-plaza-item:hover {
    border-color: var(--a3-orange);
    box-shadow: 0 2px 8px rgba(255, 106, 26, 0.15);
    transform: translateX(4px);
}

.admin-plaza-amount {
    font-size: 1.1rem;
    font-weight: 700;
    color: #007bff;
}

/* Panel de Desglose por Usuario */
.admin-usuario-card {
    background: #fff;
    border: 2px solid #e1e5ee;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.admin-usuario-card:hover {
    border-color: var(--a3-orange);
    box-shadow: 0 4px 12px rgba(255, 106, 26, 0.2);
    transform: translateY(-4px);
}

.admin-usuario-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem 1rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.admin-usuario-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--a3-orange) 0%, #ff8c42 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(255, 106, 26, 0.3);
}

.admin-usuario-body {
    padding: 1rem 0.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.admin-usuario-nombre {
    font-size: 0.875rem;
    font-weight: 600;
    color: #002251;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    min-height: 2.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-usuario-monto {
    font-size: 1.25rem;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 0.25rem;
}

.admin-usuario-count {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .admin-metric-count {
        font-size: 2rem;
    }

    .admin-metric-amount {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .admin-metric-card {
        margin-bottom: 1rem;
    }

    .admin-metric-count {
        font-size: 1.75rem;
    }

    .admin-metric-icon {
        width: 48px;
        height: 48px;
    }

    .admin-metric-amount {
        font-size: 1rem;
    }
}

/* Animation for admin cards on load */
@keyframes adminFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-metric-card {
    animation: adminFadeIn 0.5s ease-out;
}

.admin-metric-card:nth-child(1) { animation-delay: 0.1s; }
.admin-metric-card:nth-child(2) { animation-delay: 0.15s; }
.admin-metric-card:nth-child(3) { animation-delay: 0.2s; }
.admin-metric-card:nth-child(4) { animation-delay: 0.25s; }
.admin-metric-card:nth-child(5) { animation-delay: 0.3s; }

/* ========================================
   TESORERÍA - ITEMS DE USUARIO MEJORADOS
   ======================================== */

/* Icono de usuario en items */
.admin-user-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Monto principal destacado */
.admin-monto-principal {
    font-size: 1.5rem;
    font-weight: 700;
    color: #002251;
    line-height: 1.2;
}

/* Variante para reembolsos (verde) */
.admin-monto-reembolso {
    color: #28a745;
}

/* Badge para cantidad */
.badge-light.border {
    background-color: #f8f9fa;
    border-color: #dee2e6 !important;
    color: #495057;
    font-weight: 600;
}

/* Mejoras a los items de la lista */
.balance-envio-item {
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.balance-envio-item:hover .admin-monto-principal {
    color: var(--a3-orange);
}

.balance-envio-item:hover .admin-monto-reembolso {
    color: #1d6d21;
}

/* Responsive para montos */
@media (max-width: 768px) {
    .admin-monto-principal {
        font-size: 1.25rem;
    }

    .admin-user-icon {
        width: 24px;
        height: 24px;
    }
}
.metas-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.metas-title { font-weight: 700; }

/* ======================================================================
   3. BARRA DE METAS
   ====================================================================== */

.metas-cell { width: 100%; }

.metas-bar-shell {
    position: relative;
    padding-top: 25px;
    width: 100%;
}

/* Contenedor de la barra */
.metas-bar {
    position: relative;
    height: 26px;
    background: #f9fafb;
    border-radius: 999px;
    overflow: hidden;
    display: flex;
    width: 100%;
    border: 1px solid #f3f4f6; 
}

/* Segmentos */
.seg {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    min-width: 30px;
    transition: width 0.45s ease;
}

/* Vendido */
.seg-ven { 
    background: #16a34a; 
    color: #fff; 
}

.seg-pen { 
    background: #e5e7eb;
    color: #6b7280;
}

.seg--no-min { min-width: 0 !important; }

.seg-num {
    padding: 0 4px;
    font-size: 11px;
    line-height: 26px;
    text-shadow: none;
}


/* ======================================================================
   4. BURBUJA DE PORCENTAJE
   ====================================================================== */

.metas-marker {
    position: absolute;
    top: 0;
    left: clamp(20px, calc(var(--ven-pct) * 1%), calc(100% - 20px));
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.metas-pct {
    background: #fff;
    color: #111827;
    font-size: 12px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    white-space: nowrap;
}

/* El triangulito debajo de la burbuja */
.metas-pin {
    width: 0; 
    height: 0; 
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #111827;
    margin-top: 2px;
}

/* 0-50% Rojo */
.pct-danger {
    border-color: #ef4444 !important;
    color: #dc2626 !important;
    background-color: #fef2f2;
}

/* 51-89% Amarillo/Ambar */
.pct-warning {
    border-color: #f59e0b !important;
    color: #d97706 !important;
    background-color: #fffbeb;
}

/* 90-99% Verde */
.pct-success {
    border-color: #10b981 !important; 
    color: #059669 !important;
    background-color: #ecfdf5;
}

/* Naranja  */
.pct-perfect {
    background: linear-gradient(135deg, #ffc107 0%, #fffbeb 50%, #ffc107 100%) !important;
    border-color: #b45309 !important;
    color: #78350f !important;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.4) !important;
    border-width: 1px;
}


/* ==========================================================
   DISEÑO MÓVIL "CLEAN CARD" - CORREGIDO (Sin duplicados)
   ========================================================== */

@media (max-width: 768px) {

    /* 1. Ocultar los títulos de la tabla */
    .projects-header {
        display: none !important;
    }

    /* 2. Tarjeta Grid Limpia */
    .project-row, .projects-4col {
        display: grid !important;
        grid-template-areas: 
            "title title"
            "bar bar"
            "meta trend";
        grid-template-columns: 1fr 1fr; 
        gap: 12px 8px !important;
        
        background: #fff;
        border: 1px solid #eef0f4;
        border-radius: 16px;
        padding: 16px;
        margin-bottom: 16px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.03);
        align-items: center;
        height: auto !important;
    }

    /* 3. Título (Arriba) */
    .project-row > div:nth-child(1),
    .projects-4col > div:nth-child(1) {
        grid-area: title;
        font-size: 1.1rem;
        font-weight: 700;
        color: #111827;
        width: 100%;
        border-bottom: 1px solid #f9fafb;
        padding-bottom: 8px;
        margin-bottom: 0;
    }

    /* 4. Barra (Centro) */
    .project-row > div:nth-child(2),
    .projects-4col > div:nth-child(2) {
        grid-area: bar;
        width: 100% !important;
        min-width: 0 !important;
        padding-top: 5px;
    }
    .metas-cell, .metas-bar-shell, .metas-bar { width: 100% !important; }
    .metas-bar-shell { padding-top: 25px; }

    /* 5. META TOTAL (Abajo Izquierda) */
    .project-row > div:nth-child(3),
    .projects-4col > div:nth-child(3) {
        grid-area: meta;
        text-align: left;
        align-self: end;
        padding: 0;
        background: transparent !important;
        border: none !important;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .project-row > div:nth-child(3)::before {
        display: block;
        font-size: 0.75rem;
        color: #9ca3af;
        font-weight: 600;
        text-transform: uppercase;
        margin-bottom: 2px;
    }
    
    .project-row > div:nth-child(3) strong {
        font-size: 1.1rem;
        color: #374151;
    }

    /* 6. TENDENCIA (Abajo Derecha) */
    .project-row > div:nth-child(4),
    .projects-4col > div:nth-child(4) {
        grid-area: trend;
        text-align: right;
        align-self: end;
        padding: 0;
        background: transparent !important;
        border: none !important;
        display: flex;
        flex-direction: column;
        align-items: flex-end; 
    }

    .project-row > div:nth-child(4) .badge {
        font-size: 0.75rem;
        padding: 4px 8px;
    }
    
    .project-row > div:nth-child(4) small {
        display: block;
        margin-top: 3px;
        font-size: 0.75rem;
    }
}

@media (min-width: 901px) {
    .project-row .td-center .badge {
        font-size: 0.70rem !important;
        padding: 0.5em 0.8em !important;
        font-weight: 700 !important;
    }

    .project-row .td-center small {
        font-size: 0.60rem !important;
        font-weight: 600 !important;
        margin-top: 4px;
        display: inline-block;
    }
}

/* Rotación inventario: layout tipo lista */
.kpi.kpi-rotacion{
  width: 100%;
  gap: 12px;
}

/* cada fila: pill izquierda + meses derecha */
.kpi-rotacion .kpi-row{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* píldora más pequeña */
.kpi-rotacion .kpi-pill{
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  min-width: 90px;
  text-align: center;
}

/* texto de meses a la derecha */
.kpi-rotacion .kpi-metric{
  font-weight: 700;
  font-size: 13px;
  color: #6b7280;
  white-space: nowrap;
}

/* ===============================
   ROTACIÓN DE INVENTARIO
   =============================== */

.rotacion-kpi {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rotacion-title {
  text-align: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: #f35f06;
}

.rotacion-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rotacion-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Píldora */
.rotacion-pill {
  padding: 6px 0px;
  width: 80px;
  text-align: center;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid transparent;
  background: #f3f4f6;
}

/* Valor */
.rotacion-value {
  font-weight: 700;
  font-size: 0.85rem;
  color: #374151;
}

/* === COLORES === */

/* Vendida - Verde */
.rotacion-vendida .rotacion-pill {
  background: rgba(16,185,129,.12);
  color: #059669;
  border-color: rgba(16,185,129,.25);
}

/* Apartado - Naranja */
.rotacion-apartado .rotacion-pill {
  background: rgba(243,95,6,.12);
  color: #f35f06;
  border-color: rgba(243,95,6,.25);
}

/* En Tren - Azul */
.rotacion-tren .rotacion-pill {
  background: rgba(37,99,235,.12);
  color: #2563eb;
  border-color: rgba(37,99,235,.25);
}

/* Inventario - Gris */
.rotacion-inventario .rotacion-pill {
  background: rgba(107,114,128,.12);
  color: #6b7280;
  border-color: rgba(107,114,128,.25);
}

/* Vendida - Verde */
.rotacion-vendida .rotacion-value {
  color: #059669;
}

/* Apartado - Naranja */
.rotacion-apartado .rotacion-value {
  color: #f35f06;
}

/* En Tren - Azul */
.rotacion-tren .rotacion-value {
  color: #2563eb;
}

/* Inventario - Gris */
.rotacion-inventario .rotacion-value {
  color: #6b7280;
}

.rotacion-value {
  font-weight: 800;
}


/* Donut: suavidad + hover */
.donut-area svg { overflow: visible; }

.donut-slice{
  cursor: pointer;
  transform-origin: 60px 60px;
  transition: transform .16s ease, filter .16s ease, opacity .16s ease;
}
.donut-slice:hover{
  transform: scale(1.03);
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.18));
}

/* Tooltip simple */
.donut-tip{
  position: absolute;
  pointer-events: none;
  background: rgba(17,24,39,.92);
  color: #fff;
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 10px;
  transform: translate(-50%, -115%);
  white-space: nowrap;
  opacity: 0;
  transition: opacity .12s ease;
}
.donut-tip.is-on{ opacity: 1; }

/* ===== LEYENDA ===== */
.donut-legend{
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 1px;
}

/* Chip compacto */
.legend-item{
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 5px 8px;
  border-radius: 9px;
  background: #f9fafb;
  border: 1px solid #eef2f7;

  min-height: 8px;
}

/* Parte izquierda */
.legend-item-left{
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-swatch{
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* Nombre */
.legend-name{
  font-size: 13px;
  font-weight: 800;
  color: #111827;
}

/* Badge porcentaje */
.legend-badge{
  font-size: 11px;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  min-width: 38px;
  text-align: center;
}


.donut-card .donut-area{
  margin-top: 1px;
  margin-bottom: 1px;
}


/* celebraciones */
.celebracion {
    padding: 40px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    animation: slideIn 0.8s ease-out;
}

.celebracion-logo {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 48px;
    height: 48px;
    opacity: 0.9;
    z-index: 10;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.cumpleanos-card {
    background: 
        radial-gradient(circle, transparent 20%, #ff6a1a 20%, #ff6a1a 80%, transparent 80%, transparent),
        radial-gradient(circle, transparent 20%, #ff6a1a 20%, #ff6a1a 80%, transparent 80%, transparent) 25px 25px,
        linear-gradient(#ff5900 2px, transparent 2px) 0 -1px,
        linear-gradient(90deg, #ff5900 2px, transparent 2px) -1px 0;
    background-color: #ff6a1a;
    background-size: 50px 50px, 50px 50px, 25px 25px, 25px 25px;
    color: white;
    border: 8px solid #fff;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.aniversario-card {
    background: 
        linear-gradient(135deg, #e9ecef 12.5%, transparent 12.5%, transparent 87.5%, #e9ecef 87.5%, #e9ecef),
        linear-gradient(45deg, #e9ecef 12.5%, transparent 12.5%, transparent 87.5%, #e9ecef 87.5%, #e9ecef);
    background-color: #ffffff;
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    color: #1a1a1a;
    border: 8px solid #d4af37;
    box-shadow: 0 10px 40px rgba(212,175,55,0.3);
}

.celebracion-content {
    position: relative;
    z-index: 10;
}

.celebracion-titulo {
    font-weight: 700;
    font-size: 2.5rem;
    letter-spacing: 1px;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.3);
}

.aniversario-titulo {
    color: #1a1a1a;
    letter-spacing: 2px;
    text-shadow: 1px 1px 2px rgba(212,175,55,0.3);
}

.celebracion-foto {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-width: 5px !important;
}

.cumpleanos-card .celebracion-foto {
    box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 40px rgba(255,255,255,0.2) !important;
    animation: photoGlow 3s ease-in-out infinite;
}

.aniversario-foto {
    border-color: #d4af37 !important;
    box-shadow: 0 8px 24px rgba(212,175,55,0.4), 0 0 30px rgba(212,175,55,0.2) !important;
    animation: photoGlowGold 3s ease-in-out infinite;
}

.celebracion-foto-placeholder {
    background: white;
}

.celebracion-placeholder-icon {
    font-size: 80px;
    color: #ff6a1a;
}

.aniversario-placeholder {
    color: #d4af37;
}

.celebracion-nombre {
    font-weight: 700;
    font-size: 2rem;
    letter-spacing: 0.5px;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.3);
}

.aniversario-nombre {
    color: #1a1a1a;
    letter-spacing: 1px;
    text-shadow: none;
}

.celebracion-fecha {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 25px;
}

.cumpleanos-card .celebracion-fecha {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

.cumpleanos-card .celebracion-fecha p {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.aniversario-fecha {
    background: linear-gradient(135deg, #d4af37 0%, #ffd700 100%);
    border: 2px solid #b8941e;
}

.aniversario-fecha p {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    letter-spacing: 1px;
}

.celebracion-mensaje {
    max-width: 450px;
    margin: 0 auto;
    padding: 18px;
    border-radius: 15px;
}

.cumpleanos-card .celebracion-mensaje {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(5px);
}

.cumpleanos-card .celebracion-mensaje p {
    font-size: 1.15rem;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.aniversario-mensaje {
    background: rgba(212,175,55,0.1);
    border: 2px solid rgba(212,175,55,0.3);
}

.aniversario-mensaje p {
    font-size: 1.15rem;
    line-height: 1.6;
    color: #1a1a1a;
    font-weight: 500;
}

.aniversario-badge {
    display: inline-block;
    padding: 15px 35px;
    background: linear-gradient(135deg, #d4af37 0%, #ffd700 100%);
    border-radius: 50px;
    box-shadow: 0 8px 20px rgba(212,175,55,0.4);
    border: 2px solid #b8941e;
}

.aniversario-badge-numero {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a1a1a;
}

.aniversario-badge-texto {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-left: 8px;
}

/* Confeti y globos */
.confeti {
    position: absolute;
    border-radius: 50%;
    animation: confetiFall 4s ease-in-out infinite;
}

.balloon-container {
    position: absolute;
    z-index: 5;
    animation: float 4s ease-in-out infinite;
}

.balloon {
    font-size: 100px;
}

/* Confeti cumpleaños */
.cumpleanos-confeti-1 {
    top: 15%;
    left: 8%;
    width: 12px;
    height: 12px;
    background: #ffd700;
    opacity: 0.9;
}

.cumpleanos-confeti-2 {
    top: 25%;
    right: 12%;
    width: 10px;
    height: 10px;
    background: white;
    opacity: 0.8;
    animation-delay: 0.5s;
    animation-duration: 4.5s;
}

.cumpleanos-confeti-3 {
    top: 60%;
    left: 15%;
    width: 8px;
    height: 8px;
    background: #ffeb3b;
    opacity: 0.8;
    animation-delay: 1s;
    animation-duration: 4.2s;
}

.cumpleanos-confeti-4 {
    bottom: 20%;
    right: 18%;
    width: 10px;
    height: 10px;
    background: #ffd700;
    opacity: 0.9;
    animation-delay: 1.5s;
    animation-duration: 4.8s;
}

.cumpleanos-confeti-5 {
    top: 40%;
    left: 5%;
    width: 6px;
    height: 16px;
    background: white;
    transform: rotate(25deg);
    opacity: 0.7;
    animation-delay: 2s;
    animation-duration: 4.3s;
}

.cumpleanos-confeti-6 {
    top: 70%;
    right: 8%;
    width: 6px;
    height: 16px;
    background: #ffd700;
    transform: rotate(-15deg);
    opacity: 0.8;
    animation-delay: 2.5s;
    animation-duration: 4.6s;
}

/* Globos cumpleaños */
.cumpleanos-balloon-1 {
    top: -15px;
    left: 8%;
}

.cumpleanos-balloon-2 {
    top: -30px;
    left: 15%;
    animation-delay: 0.5s;
    animation-duration: 4.3s;
}

.cumpleanos-balloon-2 .balloon {
    font-size: 120px;
}

.cumpleanos-balloon-3 {
    top: -40px;
    right: 15%;
    animation-delay: 1s;
    animation-duration: 4.5s;
}

.cumpleanos-balloon-3 .balloon {
    font-size: 125px;
}

.cumpleanos-balloon-4 {
    top: -35px;
    right: 5%;
    animation-delay: 1.5s;
    animation-duration: 4.2s;
}

.cumpleanos-balloon-4 .balloon {
    font-size: 110px;
}

.cumpleanos-balloon-5 {
    bottom: 10%;
    left: 12%;
    animation-delay: 2s;
    animation-duration: 4.6s;
}

.cumpleanos-balloon-5 .balloon {
    font-size: 95px;
}

.cumpleanos-balloon-6 {
    bottom: 5%;
    left: 25%;
    animation-delay: 2.3s;
    animation-duration: 4.4s;
}

.cumpleanos-balloon-6 .balloon {
    font-size: 105px;
}

.cumpleanos-balloon-7 {
    bottom: 15%;
    right: 20%;
    animation-delay: 1.8s;
    animation-duration: 4.7s;
}

.cumpleanos-balloon-7 .balloon {
    font-size: 100px;
}

.cumpleanos-balloon-8 {
    bottom: 8%;
    right: 8%;
    animation-delay: 2.5s;
    animation-duration: 4.3s;
}

.cumpleanos-balloon-8 .balloon {
    font-size: 115px;
}

/* Decoraciones cumpleaños */
.cumpleanos-deco-1 {
    position: absolute;
    top: 35%;
    left: 15%;
    font-size: 35px;
    opacity: 0.6;
}

.cumpleanos-deco-2 {
    position: absolute;
    bottom: 30%;
    right: 18%;
    font-size: 38px;
    opacity: 0.7;
}

/* Confeti aniversario */
.aniversario-confeti-1 {
    top: 12%;
    left: 10%;
    width: 12px;
    height: 12px;
    background: #d4af37;
    opacity: 0.9;
}

.aniversario-confeti-2 {
    top: 22%;
    right: 15%;
    width: 10px;
    height: 10px;
    background: #1a1a1a;
    opacity: 0.6;
    animation-delay: 0.5s;
    animation-duration: 4.5s;
}

.aniversario-confeti-3 {
    top: 55%;
    left: 12%;
    width: 8px;
    height: 8px;
    background: #d4af37;
    opacity: 0.8;
    animation-delay: 1s;
    animation-duration: 4.2s;
}

.aniversario-confeti-4 {
    bottom: 25%;
    right: 20%;
    width: 10px;
    height: 10px;
    background: #ffd700;
    opacity: 0.9;
    animation-delay: 1.5s;
    animation-duration: 4.8s;
}

.aniversario-confeti-5 {
    top: 45%;
    left: 8%;
    width: 6px;
    height: 16px;
    background: #d4af37;
    transform: rotate(30deg);
    opacity: 0.7;
    animation-delay: 2s;
    animation-duration: 4.3s;
}

.aniversario-confeti-6 {
    top: 65%;
    right: 10%;
    width: 6px;
    height: 16px;
    background: #1a1a1a;
    transform: rotate(-20deg);
    opacity: 0.6;
    animation-delay: 2.5s;
    animation-duration: 4.6s;
}

/* Globos aniversario */
.aniversario-balloon-1 {
    top: -10px;
    left: 6%;
}

.aniversario-balloon-1 .balloon {
    font-size: 90px;
}

.aniversario-balloon-2 {
    top: -30px;
    left: 10%;
    animation-delay: 0.5s;
    animation-duration: 4.3s;
}

.aniversario-balloon-3 {
    top: -40px;
    left: 18%;
    animation-delay: 1s;
    animation-duration: 4.5s;
}

.aniversario-balloon-3 .balloon {
    font-size: 110px;
}

.aniversario-balloon-4 {
    top: -35px;
    right: 18%;
    animation-delay: 1.5s;
    animation-duration: 4.2s;
}

.aniversario-balloon-4 .balloon {
    font-size: 115px;
}

.aniversario-balloon-5 {
    top: -30px;
    right: 10%;
    animation-delay: 2s;
    animation-duration: 4.6s;
}

.aniversario-balloon-5 .balloon {
    font-size: 105px;
}

.aniversario-balloon-6 {
    top: -38px;
    right: 3%;
    animation-delay: 2.5s;
    animation-duration: 4.4s;
}

.aniversario-balloon-6 .balloon {
    font-size: 95px;
}

.aniversario-balloon-7 {
    bottom: 12%;
    left: 8%;
    animation-delay: 3s;
    animation-duration: 4.5s;
}

.aniversario-balloon-7 .balloon {
    font-size: 95px;
}

.aniversario-balloon-8 {
    bottom: 8%;
    left: 20%;
    animation-delay: 3.3s;
    animation-duration: 4.7s;
}

.aniversario-balloon-8 .balloon {
    font-size: 100px;
}

.aniversario-balloon-9 {
    bottom: 15%;
    right: 25%;
    animation-delay: 2.8s;
    animation-duration: 4.4s;
}

.aniversario-balloon-9 .balloon {
    font-size: 105px;
}

.aniversario-balloon-10 {
    bottom: 10%;
    right: 10%;
    animation-delay: 3.5s;
    animation-duration: 4.6s;
}

.aniversario-balloon-10 .balloon {
    font-size: 110px;
}

/* Decoraciones aniversario */
.aniversario-deco-1,
.aniversario-deco-2,
.aniversario-deco-3,
.aniversario-deco-4 {
    position: absolute;
    animation: sparkle 3s ease-in-out infinite;
}

.aniversario-deco-1 {
    top: 35%;
    left: 12%;
    font-size: 35px;
    opacity: 0.5;
    color: #d4af37;
}

.aniversario-deco-2 {
    bottom: 30%;
    right: 15%;
    font-size: 38px;
    opacity: 0.6;
    color: #d4af37;
    animation-delay: 0.8s;
}

.aniversario-deco-3 {
    top: 60%;
    left: 18%;
    font-size: 28px;
    opacity: 0.4;
    color: #1a1a1a;
    animation-delay: 1.2s;
}

.aniversario-deco-4 {
    top: 70%;
    right: 20%;
    font-size: 32px;
    opacity: 0.5;
    color: #d4af37;
    animation-delay: 1.6s;
}

/* Animaciones */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(-3deg);
    }
    50% {
        transform: translateY(-25px) rotate(3deg);
    }
}

@keyframes confetiFall {
    0% {
        transform: translateY(-10px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    100% {
        transform: translateY(15px) rotate(360deg);
        opacity: 0.8;
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.3) rotate(180deg);
    }
}

@keyframes photoGlow {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(0,0,0,0.3), 0 0 40px rgba(255,255,255,0.2);
    }
    50% {
        box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 60px rgba(255,255,255,0.4);
    }
}

@keyframes photoGlowGold {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(212,175,55,0.4), 0 0 30px rgba(212,175,55,0.2);
    }
    50% {
        box-shadow: 0 8px 32px rgba(212,175,55,0.6), 0 0 50px rgba(212,175,55,0.3);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}