﻿/* ================================================
   LISTA DE RESULTADOS DE BÚSQUEDA REUTILIZABLE
   ================================================ */

/* Contenedor de la lista de resultados */
.search-results-list {
    list-style: none;
    padding: 0;
    margin: 0;
    position: absolute;
    z-index: 1000;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    max-height: 300px;
    overflow-y: auto;
    left: 7px;
    right: 7px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
    display: none; /* Oculto por defecto */
}

/* Mostrar la lista cuando tenga items */
.search-results-list:not(:empty) {
    display: block;
}

/* Items de la lista */
.search-results-list li {
    padding: 10px 15px;
    border-bottom: 1px solid #e5e5e5;
    cursor: pointer;
    transition: background-color 0s;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    z-index: 1;
}

/* Último item sin borde */
.search-results-list li:last-child {
    border-bottom: none;
}

/* Hover sobre los items */
.search-results-list li:hover {
    background-color: #d9edf7;
    font-weight: bold;
    z-index: 1002;
    min-height: auto;
}

/* Item seleccionado con teclado - simula hover */
.search-results-list li.hover-effect {
    background-color: #d9edf7;
    font-weight: bold;
    z-index: 1002;
    min-height: auto;
}

/* Expandir el texto en hover-effect manteniendo el badge en su lugar */
.search-results-list li.hover-effect .item-title span:first-child {
    overflow: visible;
    white-space: normal;
    word-wrap: break-word;
    max-width: calc(100% - 120px);
    font-weight: bold;
    padding-bottom: 5px;
    padding: 5px;
    border-radius: 3px;
}

/* Hover-effect en el item - color del título */
.search-results-list li.hover-effect .item-title {
    color: #000;
}

/* Hover-effect en el subtexto */
.search-results-list li.hover-effect .item-subtitle {
    color: #555;
}

/* Item seleccionado */
.search-results-list li.active {
    background-color: #337ab7 !important;
    color: #fff !important;
    border-left: 5px solid #2e6da4;
    font-weight: bold;
}

/* Mantener el estilo active incluso en hover */
.search-results-list li.active:hover {
    background-color: #337ab7 !important;
    color: #fff !important;
}

/* Texto principal del item */
.search-results-list li .item-title {
    font-weight: bold;
    font-size: 12px;
    color: #333;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 3px;
    position: relative;
    min-height: 20px;
}

/* Primer span (texto principal) con ellipsis */
.search-results-list li .item-title span:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

/* Expandir el texto en hover manteniendo el badge en su lugar */
.search-results-list li:hover .item-title span:first-child {
    overflow: visible;
    white-space: normal;
    word-wrap: break-word;
    max-width: calc(100% - 120px);
    font-weight: bold;
    padding-bottom: 5px;
    padding: 5px;
    border-radius: 3px;
}

/* Badge (cualquier .badge dentro del item-title) */
.search-results-list li .item-title .badge {
    flex-shrink: 0;
    margin-left: auto;
}

/* Hover en el item - color del título */
.search-results-list li:hover .item-title {
    color: #000;
}

/* Item activo en el texto principal */
.search-results-list li.active .item-title {
    color: #fff;
}

/* Subtexto del item */
.search-results-list li .item-subtitle {
    font-size: 11px;
    color: #777;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
}

/* Hover en el subtexto */
.search-results-list li:hover .item-subtitle {
    color: #555;
}

/* Item activo en el subtexto */
.search-results-list li.active .item-subtitle {
    color: #e5e5e5;
}

/* Texto cortado con puntos suspensivos */
.search-results-list li .text-ellipsis {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Mensaje cuando no hay resultados */
.search-results-list li.no-results {
    cursor: default;
    text-align: center;
    color: #999;
    font-style: italic;
    min-height: auto;
}

.search-results-list li.no-results:hover {
    background-color: transparent;
    font-weight: normal;
    min-height: auto;
}

/* Loading/Cargando */
.search-results-list li.loading {
    cursor: default;
    text-align: center;
    color: #337ab7;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-results-list li.loading:hover {
    background-color: transparent;
    font-weight: normal;
}

.search-results-list li.loading:before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #337ab7;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.search-results-list li.no-results:hover {
    background-color: transparent;
    font-weight: normal;
}

/* Scrollbar personalizado para la lista */
.search-results-list::-webkit-scrollbar {
    width: 8px;
}

.search-results-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.search-results-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.search-results-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

input[type="month"] {
    font-size: 16px;
    color: #333;
    border-radius: 5px;
    text-transform: uppercase;
}

input[type="month"]::-webkit-datetime-edit {
    text-transform: uppercase;
}

/* ================================================
   UTILIDADES DE TRUNCADO Y ANCHO (REUTILIZABLES)
   ================================================ */
/* Uso: <td class="rdk-trunc rdk-w-150">Texto largo aquí</td>
   Trunca con "..." y muestra completo al pasar cursor */

.rdk-trunc {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    cursor: pointer;
}

.rdk-trunc:hover {
    overflow: visible;
    white-space: normal;
    word-break: break-word;
    background-color: #ffffff;
    position: relative;
    z-index: 2;
}

/* Ancho límite para truncado */
.rdk-w-80 { max-width: 80px; }
.rdk-w-100 { max-width: 100px; }
.rdk-w-120 { max-width: 120px; }
.rdk-w-150 { max-width: 150px; }
.rdk-w-180 { max-width: 180px; }
.rdk-w-200 { max-width: 200px; }
.rdk-w-220 { max-width: 220px; }
.rdk-w-250 { max-width: 250px; }
.rdk-w-300 { max-width: 300px; }

/* ================================================
   TARJETAS DE RESUMEN (REUTILIZABLE)
   ================================================ */

.summary-metrics-panel {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
}

.summary-metrics-row {
    margin-left: -6px;
    margin-right: -6px;
}

.summary-metric-col {
    padding-left: 6px;
    padding-right: 6px;
    margin-bottom: 10px;
}

.summary-metrics-card {
    position: relative;
    background: #ffffff;
    border: 1px solid #d9e6f7;
    border-radius: 12px;
    padding: 12px 12px 10px;
    box-shadow: 0 1px 4px rgba(34, 65, 102, 0.08);
    min-height: 108px;
    overflow: hidden;
    width: 100%;
}

.summary-metrics-card-wide {
    min-height: auto;
}

.summary-metrics-card:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #2f6fb2;
}

.summary-metrics-card.success:before {
    background: #2d9f63;
}

.summary-metrics-card.info:before {
    background: #2f6fb2;
}

.summary-metrics-card.warning:before {
    background: #d2982f;
}

.summary-metrics-card.primary:before {
    background: #4256cc;
}

.summary-metrics-card.danger:before,
.summary-metrics-card.error:before {
    background: #d9534f;
}

.summary-metrics-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.summary-metrics-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #3b4a63;
    line-height: 1.3;
}

.summary-metrics-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #edf4fd;
    color: #2f6fb2;
    font-size: 15px;
}

.summary-metrics-card.success .summary-metrics-icon {
    background: #eaf8f0;
    color: #2d9f63;
}

.summary-metrics-card.warning .summary-metrics-icon {
    background: #fff5e8;
    color: #d2982f;
}

.summary-metrics-card.primary .summary-metrics-icon {
    background: #eceffe;
    color: #4256cc;
}

.summary-metrics-card.danger .summary-metrics-icon,
.summary-metrics-card.error .summary-metrics-icon {
    background: #fbe9e8;
    color: #d9534f;
}

.summary-metrics-value {
    display: block;
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    color: #1f2f4d;
    margin: 2px 0 5px;
}

.summary-metrics-sub {
    display: block;
    font-size: 12px;
    color: #5e6e89;
}

.summary-stats-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 2px;
}

.summary-stat-pill {
    background: #eef4fc;
    border: 1px solid #d4e0f2;
    border-radius: 10px;
    padding: 8px 10px;
    text-align: center;
}

.summary-stat-pill.warning {
    background: #fff6ea;
    border-color: #f0d4ad;
}

.summary-stat-pill.success {
    background: #eaf8f0;
    border-color: #bde5ce;
}

.summary-stat-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #4a5a75;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.summary-stat-value {
    display: block;
    font-size: 21px;
    font-weight: 800;
    line-height: 1.15;
    color: #203252;
}

@media (max-width: 991px) {
    .summary-metrics-card {
        min-height: 98px;
    }

    .summary-metrics-value {
        font-size: 23px;
    }
}

@media (max-width: 767px) {
    .summary-stats-row {
        grid-template-columns: 1fr;
    }
}

/* Resumen de partida - compacto para no competir con el detalle */
.rdk-journal-summary-body {
    padding: 12px;
}

.rdk-journal-summary .summary-metric-col {
    margin-bottom: 10px;
}

.rdk-journal-summary-card {
    min-height: 84px;
    padding: 10px 12px 8px;
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(34, 65, 102, 0.06);
}

.rdk-journal-summary-card .summary-metrics-head {
    margin-bottom: 6px;
}

.rdk-journal-summary-card .summary-metrics-label {
    font-size: 12px;
}

.rdk-journal-summary-card .summary-metrics-icon {
    width: 28px;
    height: 28px;
    font-size: 13px;
}

.rdk-journal-summary-value {
    font-size: 22px;
    margin-top: 0;
    margin-bottom: 0;
}

.rdk-autosize-card {
    white-space: nowrap !important;
    word-break: normal;
    overflow-wrap: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.05;
    letter-spacing: -0.2px;
}

.rdk-journal-summary .summary-metrics-card:before {
    height: 3px;
}

@media (max-width: 767px) {
    .rdk-journal-summary-body {
        padding: 10px;
    }

    .rdk-journal-summary-card {
        min-height: 76px;
        padding: 9px 10px 7px;
    }

    .rdk-journal-summary-value {
        font-size: 19px;
    }
}


/* Se aplica diseño segun nivel */
#list-account-catalog a[data-level-accounting-id="1"] {
    color: #000; /* Color de texto oscuro */
    font-size: 24px; /* Tamaño de fuente grande */
}
#list-account-catalog a[data-level-accounting-id="1"] .badge {
    font-size: 18px; /* Tamaño de fuente grande para el badge */
}

#list-account-catalog .badge {
    display: inline-block;
    padding: 5px 10px;       /* Controla tamaño interno del badge */
    border-radius: 12px;     /* Hace que sea más redondeado */
    font-size: 0.85em;
    min-width: 24px;         /* Evita que sea demasiado pequeño */
    text-align: center;
}

/* Cuando pasa el curso sobre a se sobrea */
#list-account-catalog a:hover {
    background-color: #337ab7; /* Color de fondo más claro al pasar el cursor */
    color: #fff; /* Cambia el color del texto al pasar el cursor */
    text-decoration: none; /* Elimina el subrayado al pasar el cursor */
    font-weight: bold; /* Hace que el texto sea más destacado */
}

/*.bootstrap-select .dropdown-menu {*/
/*    width: 100% !important;*/
/*    max-width: 100% !important;*/
/*    box-sizing: border-box;*/
/*}*/

/* quita los border del input type text con la clase tbl-input */
input[type="text"].tbl-input,
textarea.tbl-input {
    border: none;
    box-shadow: none;
    background-color: transparent;
    /* Letra en negrista */
    font-weight: bold;
    width: 100%; /* Ocupa el 100% del ancho de la celda */
    box-sizing: border-box; /* Asegura que el padding y el border se incluyan en el ancho total */
    padding: 6px 12px;
    line-height: 20px;
    display: block;
}

/* Mantiene una altura visual uniforme en inputs de una sola linea */
input[type="text"].tbl-input {
    height: 34px;
}

textarea.tbl-input {
    height: 34px;
    resize: none;
}

/* Alineado por defecto, excepto cuando se use utilidades de Bootstrap */
input[type="text"].tbl-input:not(.text-left):not(.text-center):not(.text-right),
textarea.tbl-input:not(.text-left):not(.text-center):not(.text-right) {
    text-align: right;
}

/* Activador multilinea para campos tbl-input */
textarea.tbl-input.tbl-input-expandable {
    overflow-y: hidden;
    min-height: 34px;
    line-height: 1.35;
    white-space: pre-wrap;
    word-break: break-word;
}

/* aplica borde botom cuando esta focus */
input[type="text"].is-valid:focus,
textarea.is-valid:focus {
    border-bottom: 2px solid #337ab7; /* Cambia el color del borde al focus */
    outline: none; /* Elimina el outline por defecto */
}

/* Cuando tiene el focus y la class is-invalid pasa a ser rojo */
input[type="text"].is-invalid,
textarea.is-invalid {
    border-bottom: 2px solid red; /* Cambia el color del borde al focus */
    outline: none; /* Elimina el outline por defecto */
}

/* info-text */
.info-text {
    font-size: 0.7em; /* Tamaño de fuente más pequeño */
    color: #555; /* Color gris para el texto informativo */
    margin-top: 2px; /* Espacio entre el input y el texto informativo */
    display: block; /* Asegura que ocupe toda la línea */
    text-align: right; /* Alinea el texto a la derecha */
    display: none; /* Oculta el mensaje por defecto */
}

/* Muestra el mensaje cuando el input tiene focus */
input[type="text"].tbl-input:focus + .info-text,
textarea.tbl-input:focus + .info-text {
    display: block; /* Muestra el mensaje cuando el input tiene focus */
}

/* Alinea el info-text segun la utilidad de alineacion del campo */
input[type="text"].tbl-input.text-left:focus + .info-text,
textarea.tbl-input.text-left:focus + .info-text {
    text-align: left;
}

input[type="text"].tbl-input.text-center:focus + .info-text,
textarea.tbl-input.text-center:focus + .info-text {
    text-align: center;
}

input[type="text"].tbl-input.text-right:focus + .info-text,
textarea.tbl-input.text-right:focus + .info-text {
    text-align: right;
}

/* Config reusable: tbl-input + tbl-input-money */
/* Nota: se mantiene compatibilidad con .tbl-input-currency */
.tbl-input-money-wrap,
.tbl-input-currency {
    position: relative;
}

.tbl-input-money-wrap:before,
.tbl-input-currency:before {
    content: "$";
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
    font-weight: 700;
    pointer-events: none;
    z-index: 1;
}

.tbl-input-money-wrap > input[type="text"].tbl-input.tbl-input-money,
.tbl-input-currency > input[type="text"].tbl-input {
    padding-left: 24px;
}

.tbl-input-money-wrap:focus-within:before,
.tbl-input-currency:focus-within:before {
    color: #337ab7;
}

.tbl-input-money-wrap:focus-within + .info-text,
.tbl-input-currency:focus-within + .info-text {
    display: block;
}

/* Modificacion de alert warning para mejor lectura */
.alert-warning {
    background-color: #fef3c7 !important;
    color: #374151 !important;
    border-color: #fcd34d !important;
}

.alert-warning .btn-close {
    filter: invert(40%);
}

/* Aplica a swal2-select el estilo de bootstrap */
.swal2-select{
    width: 100%;
    height: 38px;
    border-radius: 4px;
    border: 1px solid #ccc;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    background-color: #fff;
    background-image: none;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
}

/* Obliga que el ancho del menu del selectpicker sea 100% */
.bootstrap-select .dropdown-menu {
    max-width: 100%!important;
    min-width: 100%!important;
    width: 100%!important;
}

/* Asegura que el contenedor del bootstrap-select ocupe todo el ancho */
.bootstrap-select {
    width: 100%!important;
}

/* Para el botón del selectpicker */
/* Para el botón del selectpicker (solo el toggle principal) */
.bootstrap-select > .btn {
    width: 100% !important;
}

/* No afectar los botones de acciones dentro del menú del selectpicker */
.bootstrap-select .dropdown-menu .bs-actionsbox .btn {
    width: auto !important;
}

/* Que los botones de acciones ocupen el ancho del input */
.bootstrap-select .dropdown-menu .bs-actionsbox .btn-group {
    display: flex;
    width: 100%;
}

.bootstrap-select .dropdown-menu .bs-actionsbox .btn {
    flex: 1 1 50%;
    width: 50% !important; /* cada botón ocupa la mitad */
    box-sizing: border-box;
}

/* Lista de Compras y Gatos Abiertas */
.list-pe-item {
	height: 95px;
	overflow: hidden;
	position: relative;
	transition: all 0.3s ease;
}
.list-pe-item::after {
	content: '...';
	position: absolute;
	bottom: 5px;
	right: 10px;
	background: #fff;
	padding-left: 10px;
	font-weight: bold;
	color: #999;
}
.list-pe-item:hover {
	height: auto;
	background-color: #f5f5f5;
	border-color: #428bca;
	z-index: 10;
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.list-pe-item:hover::after {
	display: none;
}

/* si tiene la clase .active se le aplica color de fondo gris claro y borde izquierdo azul */
.list-pe-item.active-item {
    background-color: #e7f1fa;
    border-left: 5px solid #428bca;
}
/* También lo aplica en los ... */
.list-pe-item.active-item::after {
    background-color: #e7f1fa;
}


/* Corrección para input-group-btn - Botones unidos al input */
.input-group .input-group-btn {
    position: relative;
    white-space: nowrap;
    display: table-cell;       /* Mantener como table-cell para Bootstrap 3 */
    width: 1%;
    vertical-align: middle;
    font-size: 0;             /* Elimina espacios entre botones inline-block */
}

.input-group-btn .btn {
    height: 34px;              /* misma altura que los inputs form-control */
    padding: 6px 12px;
    line-height: 1.42857143;   /* coincide con Bootstrap 3 */
    border-radius: 0 !important;          /* Sin bordes redondeados */
    border: 1px solid #ccc;    /* Mismo borde que form-control */
    font-size: 14px;           /* Restaurar tamaño de fuente después de font-size: 0 */
    position: relative;        /* Posición relativa para z-index */
    display: inline-block;     /* Inline-block para botones */
    vertical-align: top;       /* Alineación vertical */
    margin: 0;                 /* Sin márgenes */
}

/* El primer botón mantiene su borde izquierdo (separador del input) */

/* Segundo y siguientes botones */
.input-group-btn .btn:not(:first-child) {
    border-left: none;
}

/* Último botón con esquinas redondeadas a la derecha */
.input-group > .input-group-btn:last-child > .btn:last-child {
    border-top-right-radius: 4px !important;
    border-bottom-right-radius: 4px !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* Borde separador entre input y primer botón */
.input-group-btn .btn:first-child {
    border-left: 1px solid #ccc;
}

/* Botones de colores específicos */
.input-group-btn .btn-success {
    background-color: #5cb85c;
    border-color: #4cae4c;
    color: #fff;
}

.input-group-btn .btn-danger {
    background-color: #d9534f;
    border-color: #d43f3a;
    color: #fff;
}

/* Estados hover */
.input-group-btn .btn-success:hover {
    background-color: #4cae4c;
    border-color: #398439;
}

.input-group-btn .btn-danger:hover {
    background-color: #c9302c;
    border-color: #ac2925;
}

/* Asegurar que los botones mantengan el foco visual correctamente */
.input-group-btn .btn:focus,
.input-group-btn .btn:active {
    z-index: 2;
}


/* aplica radius a los input */
.form-control {
    border-radius: 4px;
}

/* ================================================
   REDISEÑO DEL TOOLTIP NATIVO - ESTILO BOOTSTRAP 3.4.1
   ================================================ */

/* Configuración base para tooltips - mantener funcionalidad normal */
[title] {
    position: relative;
}

/* Tooltips personalizados usando data-rdk-title */
.rdk-tooltips[data-rdk-title] {
    position: relative !important;
    cursor: pointer;
    /* Personalización del tooltip usando pseudo-elementos CSS */
}

/* Rediseñar tooltips aplicando estilos Bootstrap solo a .rdk-tooltips */
.rdk-tooltips[data-rdk-title]::before {
    content: attr(data-rdk-title);
    position: absolute;
    z-index: 1070;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
    white-space: normal;
    overflow-wrap: break-word;
    width: max-content;
    max-width: 400px;
    text-align: center;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    
    /* Posicionamiento arriba por defecto */
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    margin-bottom: 8px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease-in-out, visibility 0s linear 0.15s;
}

/* Flecha del tooltip estilo Bootstrap */
.rdk-tooltips[data-rdk-title]::after {
    content: '';
    position: absolute;
    z-index: 1071;
    width: 0;
    height: 0;
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);

    /* Posicionamiento de la flecha */
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 2px;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease-in-out, visibility 0s linear 0.15s;
}

/* Mostrar tooltip al hacer hover */
.rdk-tooltips[data-rdk-title]:hover::before,
.rdk-tooltips[data-rdk-title]:hover::after {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

/* Variantes de tema Bootstrap para elementos con clase específica */
.rdk-tooltips.tooltip-primary[data-rdk-title]:hover::before {
    background-color: #337ab7;
    border-color: #2e6da4;
}
.rdk-tooltips.tooltip-primary[data-rdk-title]:hover::after {
    border-top-color: #337ab7;
}

.rdk-tooltips.tooltip-success[data-rdk-title]:hover::before {
    background-color: #5cb85c;
    border-color: #4cae4c;
}
.rdk-tooltips.tooltip-success[data-rdk-title]:hover::after {
    border-top-color: #5cb85c;
}

.rdk-tooltips.tooltip-info[data-rdk-title]:hover::before {
    background-color: #5bc0de;
    border-color: #46b8da;
}
.rdk-tooltips.tooltip-info[data-rdk-title]:hover::after {
    border-top-color: #5bc0de;
}

.rdk-tooltips.tooltip-warning[data-rdk-title]:hover::before {
    background-color: #f0ad4e;
    border-color: #eea236;
}
.rdk-tooltips.tooltip-warning[data-rdk-title]:hover::after {
    border-top-color: #f0ad4e;
}

.rdk-tooltips.tooltip-danger[data-rdk-title]:hover::before {
    background-color: #d9534f;
    border-color: #d43f3a;
}
.rdk-tooltips.tooltip-danger[data-rdk-title]:hover::after {
    border-top-color: #d9534f;
}

/* Tooltip con texto largo */
.rdk-tooltips.tooltip-multiline[data-rdk-title]:hover::before {
    white-space: normal;
    max-width: 250px;
    text-align: left;
}

/* Ajustes para iconos FontAwesome y Glyphicons */

.rdk-tooltips.fa[data-rdk-title]:hover::before,
.rdk-tooltips.glyphicon[data-rdk-title]:hover::before,
.rdk-tooltips i[data-rdk-title]:hover::before {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif !important;
    font-style: normal;
    font-weight: 400;
}

/* Posicionamiento para elementos en esquinas o bordes */
.rdk-tooltips.tooltip-right[data-rdk-title]::before {
    bottom: auto;
    left: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    margin-left: 8px;
    margin-bottom: 0;
}

.rdk-tooltips.tooltip-right[data-rdk-title]::after {
    bottom: auto;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 2px;
    margin-bottom: 0;
    border: 6px solid transparent;
    border-right-color: rgba(0, 0, 0, 0.9);
}

.rdk-tooltips.tooltip-left[data-rdk-title]::before {
    bottom: auto;
    right: 100%;
    top: 50%;
    left: auto;
    transform: translateY(-50%) translateX(-8px);
    margin-right: 8px;
    margin-bottom: 0;
}

.rdk-tooltips.tooltip-left[data-rdk-title]::after {
    bottom: auto;
    right: 100%;
    top: 50%;
    left: auto;
    transform: translateY(-50%);
    margin-right: 2px;
    margin-bottom: 0;
    border: 6px solid transparent;
    border-left-color: rgba(0, 0, 0, 0.9);
}

.rdk-tooltips.tooltip-bottom[data-rdk-title]::before {
    top: 100%;
    bottom: auto;
    transform: translateX(-50%) translateY(8px);
    margin-top: 8px;
    margin-bottom: 0;
}

.rdk-tooltips.tooltip-bottom[data-rdk-title]::after {
    top: 100%;
    bottom: auto;
    transform: translateX(-50%);
    margin-top: 2px;
    margin-bottom: 0;
    border: 6px solid transparent;
    border-bottom-color: rgba(0, 0, 0, 0.9);
}

/* Responsive - Simplificar en móviles */
@media (max-width: 768px) {
    .rdk-tooltips[data-rdk-title]::before {
        font-size: 11px;
        padding: 6px 10px;
        max-width: 160px;
    }
    
    .rdk-tooltips[data-rdk-title]::after {
        border-width: 5px;
    }
}

/* Ocultar en dispositivos táctiles para evitar problemas de UX */
@media (hover: none) and (pointer: coarse) {
    .rdk-tooltips[data-rdk-title]:hover::before,
    .rdk-tooltips[data-rdk-title]:hover::after {
        display: none !important;
    }
}

/* ================================================
   INPUT TIME - AJUSTES PARA SELECT MERIDIANO (AM/PM)
   ================================================ */

/* Hacer que input-group use flexbox (solo para el grupo de tiempo) */
.input-group.rdk-time-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

/* Input-group-addon mantiene su tamaño */
.input-group.rdk-time-group .input-group-addon {
    flex: 0 0 auto;
}

/* Input de tiempo toma el espacio restante */
.input-group.rdk-time-group .rdk-time {
    flex: 1 1 auto;
    min-width: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Addon del meridiano */
.input-group.rdk-time-group .rdk-group-addon.rdk-time-meridian {
    flex: 0 0 80px;
    width: 80px;
    display: flex;
    align-items: stretch;
}

/* Select dentro del addon del meridiano */
.input-group.rdk-time-group .rdk-group-addon.rdk-time-meridian select {
    width: 100%;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    border-left: 0;
    cursor: pointer;
}

/* Estilos para las opciones del select - Estilo Bootstrap Selectpicker */
.input-group.rdk-time-group .rdk-group-addon.rdk-time-meridian select option {
    padding: 10px 15px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    cursor: pointer;
    font-weight: normal;
    line-height: 1.42857143;
}

/* Hover en las opciones - Estilo Selectpicker */
.input-group.rdk-time-group .rdk-group-addon.rdk-time-meridian select option:hover {
    background-color: #f5f5f5;
    color: #262626;
    font-weight: normal;
    cursor: pointer;
}

/* Opción seleccionada - Estilo Selectpicker con checkmark */
.input-group.rdk-time-group .rdk-group-addon.rdk-time-meridian select option:checked {
    background-color: #fff;
    background-image: linear-gradient(#f5f5f5, #f5f5f5);
    color: #333;
    font-weight: 600;
}

/* Estilos mejorados para Firefox y otros navegadores */
.input-group.rdk-time-group .rdk-group-addon.rdk-time-meridian select:focus {
    border-color: #66afe9;
    outline: 0;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
}

.input-group.rdk-time-group .rdk-group-addon.rdk-time-meridian select:focus option:checked {
    background: #f5f5f5;
    background-color: #f5f5f5 !important;
    color: #333;
    font-weight: 600;
}

/* Hover sobre la opción seleccionada - Estilo Selectpicker */
.input-group.rdk-time-group .rdk-group-addon.rdk-time-meridian select option:checked:hover {
    background-color: #e8e8e8;
    color: #262626;
    font-weight: 600;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .input-group.rdk-time-group .rdk-group-addon.rdk-time-meridian {
        flex: 0 0 70px;
        width: 70px;
    }
}

/* Modal extra grande (Bootstrap 3.4): 30% más ancho que modal-lg (900px) */
@media (min-width: 992px) {
    .modal-dialog.rdk-modal-xlg,
    .rdk-modal-xlg .modal-dialog {
        width: 1170px;
    }
}

/* ================================================
    RDK METRIC CARDS - BOOTSTRAP 3.4 FRIENDLY
    Reusable cards for balance, totals, summaries and more.
    ================================================ */

.rdk-wrap {
    margin: 12px 0 18px;
}

.rdk-gauge-card-enter {
    opacity: 0;
    transform: translateY(18px) scale(0.92);
    filter: blur(4px);
    transform-origin: center center;
    transition: opacity .42s ease, transform .42s cubic-bezier(.2,.75,.2,1), filter .42s ease;
    will-change: opacity, transform, filter;
}

.rdk-card {
    background: #f5f5f5;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    text-align: center;
    padding: 18px 14px 16px;
    min-height: 138px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.rdk-card:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

/* Estado alterno: sombra fija sin animacion al pasar el cursor */
.rdk-card.rdk-card-static {
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    transition: none;
}

.rdk-card.rdk-card-static:hover {
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    transform: none;
}

.rdk-card.rdk-card-featured {
    min-height: 156px;
    padding-top: 20px;
    background: #f3f3f3;
}

.rdk-title {
    margin: 0 0 8px;
    font-size: 27px;
    line-height: 1.2;
    color: #555;
    font-weight: 500;
}

.rdk-card-featured .rdk-title {
    font-size: 31px;
}

.rdk-currency {
    display: block;
    margin: 0;
    line-height: 1;
    font-size: 54px;
    color: #d9534f;
    font-weight: 700;
}

.rdk-amount {
    margin: 2px 0 4px;
    line-height: 1.05;
    font-size: 54px;
    color: #d9534f;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.rdk-card-featured .rdk-amount {
    font-size: 56px;
    color: #222;
}

.rdk-subtext {
    margin: 0;
    font-size: 24px;
    color: #666;
    line-height: 1.25;
    font-weight: 500;
}

.rdk-helper {
    margin: 0;
    font-size: 20px;
    color: #777;
    line-height: 1.25;
}

.rdk-status-danger {
    color: #d9534f;
    font-weight: 600;
}

.rdk-status-muted {
    color: #777;
    font-weight: 500;
}

.rdk-card.rdk-card-profile {
    min-height: 0;
    padding: 16px 20px;
}

.rdk-card-profile .rdk-card-title {
    margin: 0 0 10px;
    font-size: 24px;
    text-align: center;
    color: #4f6480;
    font-weight: 700;
}

.rdk-divider {
    border-top: 1px solid #d5dde8;
    margin: 0 0 14px;
}

.rdk-info-row {
    margin-left: -8px;
    margin-right: -8px;
}

.rdk-info-row > [class*="col-"] {
    padding-left: 8px;
    padding-right: 8px;
}

.rdk-info-row-secondary {
    margin-top: 12px;
}

.rdk-info-text {
    font-size: 16px;
    line-height: 1.25;
    color: #637a99;
    margin-bottom: 8px;
}

.rdk-info-text strong {
    color: #536b88;
}

/* Card Variants - Colored borders con fondos claros */
.rdk-card-success {
    background: #f0f7ed;
    border: 1px solid #d8d8d8;
    border-left: 4px solid #2d9f63;
}

.rdk-card-success:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.rdk-card-warning {
    background: #fffaf5;
    border: 1px solid #d8d8d8;
    border-left: 4px solid #f0ad4e;
}

.rdk-card-warning:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.rdk-card-info {
    background: #e8f4f8;
    border: 1px solid #d8d8d8;
    border-left: 4px solid #5bc0de;
}

.rdk-card-info:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.rdk-card-primary {
    background: #e8f4f8;
    border: 1px solid #d8d8d8;
    border-left: 4px solid #337ab7;
}

.rdk-card-primary:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.rdk-card-danger {
    background: #fdf8f6;
    border: 1px solid #d8d8d8;
    border-left: 4px solid #d9534f;
}

.rdk-card-danger:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

/* Card Variants - Gradient backgrounds (alternativo) */
.rdk-card-gradient-success {
    background: linear-gradient(135deg, #f5f9f7 0%, #e8f5f3 100%);
    border: 1px solid #d8d8d8;
}

.rdk-card-gradient-success:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.rdk-card-gradient-warning {
    background: linear-gradient(135deg, #fffaf5 0%, #fff5e6 100%);
    border: 1px solid #d8d8d8;
}

.rdk-card-gradient-warning:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.rdk-card-gradient-info {
    background: linear-gradient(135deg, #f0f7fb 0%, #e6f3f9 100%);
    border: 1px solid #d8d8d8;
}

.rdk-card-gradient-info:hover {
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

@media (max-width: 991px) {


    .rdk-wrap {
        margin-bottom: 12px;
    }

    .rdk-card,
    .rdk-card.rdk-card-featured {
        min-height: 0;
    }

    .rdk-title {
        font-size: 22px;
    }

    .rdk-card-featured .rdk-title {
        font-size: 24px;
    }

    .rdk-currency,
    .rdk-amount,
    .rdk-card-featured .rdk-amount {
        font-size: 44px;
    }

    .rdk-subtext {
        font-size: 20px;
    }

    .rdk-helper {
        font-size: 18px;
    }

    .rdk-card-profile .rdk-card-title {
        font-size: 21px;
    }

    .rdk-info-text {
        font-size: 17px;
    }
}

@media (max-width: 767px) {
    .rdk-card {
        padding: 16px 12px;
        border-radius: 7px;
    }

    .rdk-title,
    .rdk-card-featured .rdk-title {
        font-size: 20px;
    }

    .rdk-currency,
    .rdk-amount,
    .rdk-card-featured .rdk-amount {
        font-size: 38px;
    }

    .rdk-subtext {
        font-size: 18px;
    }

    .rdk-helper {
        font-size: 16px;
    }

    .rdk-card.rdk-card-profile {
        padding: 14px 14px;
    }

    .rdk-card-profile .rdk-card-title {
        font-size: 17px;
    }

    .rdk-info-text {
        font-size: 14px;
        margin-bottom: 6px;
    }
}

/* ================================================
   RDK PROGRESS (LINEAR + SEMICIRCLE)
   - Set percentage with: style="--rdk-progress: 65;"
   - Color changes from green (0%) to red (100%)
   ================================================ */

.rdk-progress-wrap {
    --rdk-progress: 0;
    --rdk-track: #e3e8ee;
    --rdk-progress-angle: calc(var(--rdk-progress) * 1.8deg);
    --rdk-progress-color: hsl(calc(120 - (var(--rdk-progress) * 1.2)), 58%, 45%);
    --rdk-progress-center-bg: #f5f5f5;
    --rdk-gauge-score-size: clamp(26px, 4.8vw, 54px);
    --rdk-gauge-caption-size: clamp(12px, 1.5vw, 16px);
    --rdk-gauge-edge-size: clamp(13px, 1.6vw, 19px);
    --rdk-gauge-edge-top: 86.8%;
    --rdk-gauge-center-top: 50%;
    --rdk-gauge-center-shift-y: 0px;
    --rdk-gauge-center-max-width: 90%;
    width: 100%;
}

.rdk-progress-title {
    margin: 0 0 10px;
    font-size: 18px;
    color: #4e627c;
    text-align: center;
    font-weight: 600;
}

/* Linear progress */
.rdk-progress-line {
    position: relative;
    width: 100%;
    height: 16px;
    background: var(--rdk-track);
    border: 1px solid #d2dae3;
    border-radius: 20px;
    overflow: hidden;
}

.rdk-progress-line-fill {
    height: 100%;
    width: calc(var(--rdk-progress) * 1%);
    min-width: 2px;
    border-radius: inherit;
    background: linear-gradient(90deg, #ef5350 0%, #d4c343 50%, #5ecf8f 100%);
    transition: width 0.25s ease, background-color 0.25s ease;
}

.rdk-progress-line-value {
    margin-top: 8px;
    font-size: 14px;
    text-align: center;
    font-weight: 600;
    color: #5a6f88;
}

/* Semicircle progress */
.rdk-progress-semi {
    position: relative;
    width: 270px;
    height: 140px;
    margin: 0 auto;
    overflow: hidden;
}

.rdk-progress-semi-arc {
    position: absolute;
    inset: 0;
    border-radius: 270px 270px 0 0;
    background: conic-gradient(
        from 180deg at 50% 100%,
        var(--rdk-progress-color) 0deg,
        var(--rdk-progress-color) var(--rdk-progress-angle),
        var(--rdk-track) var(--rdk-progress-angle),
        var(--rdk-track) 180deg,
        transparent 180deg,
        transparent 360deg
    );
}

.rdk-progress-semi-arc::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    top: 14px;
    bottom: -14px;
    background: var(--rdk-progress-center-bg);
    border-radius: 250px 250px 0 0;
}

.rdk-progress-semi-value {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    text-align: center;
    font-size: 34px;
    font-weight: 700;
    color: #3f536e;
    z-index: 2;
    line-height: 1;
}

/* Gauge semicircular estilo bootstrap 3.4 */
.rdk-gauge {
    position: relative;
    width: 100%;
    max-width: none;
    aspect-ratio: 1.4 / 1;
    container-type: inline-size;
    min-height: 128px;
    --rdk-gauge-min-x: 8.3333%;
    --rdk-gauge-max-x: 91.6667%;
    --rdk-gauge-min-text-shift: 0px;
    --rdk-gauge-max-text-shift: 0px;
    margin: 0 auto;
}

.rdk-gauge-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.rdk-gauge-track,
.rdk-gauge-value {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
}

.rdk-gauge-track {
    stroke: #dde3ea;
}

.rdk-gauge-value {
    stroke: url(#rdk-gauge-gradient);
}

.rdk-gauge-value-inline-gradient {
    stroke: url(#rdk-gauge-gradient);
}

.rdk-gauge-center {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--rdk-gauge-center-top);
    transform: translateY(calc(-50% + var(--rdk-gauge-center-shift-y)));
    text-align: center;
    width: 100%;
    max-width: var(--rdk-gauge-center-max-width);
    margin: 0 auto;
    padding: 0 clamp(8px, 3cqw, 16px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-sizing: border-box;
    z-index: 10;
    pointer-events: none;
}

.rdk-gauge-score {
    font-size: var(--rdk-gauge-score-size);
    line-height: 1;
    font-weight: 700;
    color: #3d516b;
    margin: 0;
    width: 100%;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
}

.rdk-gauge-caption {
    margin: 0;
    font-size: var(--rdk-gauge-caption-size);
    color: #36bfa8;
    font-weight: 600;
    line-height: 1.32;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.rdk-gauge-min,
.rdk-gauge-max {
    position: absolute;
    top: var(--rdk-gauge-edge-top);
    bottom: auto;
    font-size: var(--rdk-gauge-edge-size);
    color: #7d8ea2;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    max-width: calc(50% - 6px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    z-index: 3;
}

.rdk-gauge-min {
    left: var(--rdk-gauge-min-x);
    transform: translateX(calc(-50% + var(--rdk-gauge-min-text-shift)));
}

.rdk-gauge-max {
    left: var(--rdk-gauge-max-x);
    transform: translateX(calc(-50% + var(--rdk-gauge-max-text-shift)));
}

/* Product Transfer - Capacity progress (line) */
.rdk-transfer-capacity-row > td {
    padding-top: 10px;
    padding-bottom: 10px;
}

.rdk-transfer-capacity-wrap {
    background: #f8fafc;
    border: 1px solid #d9e2ee;
    border-radius: 8px;
    padding: 10px 10px 8px;
}

.rdk-transfer-capacity-enter {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .22s ease, transform .22s ease;
    will-change: opacity, transform;
}

.rdk-transfer-capacity-enter.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.rdk-transfer-capacity-block {
    margin-bottom: 8px;
}

.rdk-transfer-progress-line-wrap {
    padding-top: 14px;
}

.rdk-transfer-progress-line {
    height: 18px;
    border-radius: 10px;
    background: #e6edf6;
}

.rdk-transfer-progress-line-fill {
    background: linear-gradient(90deg, #5ecf8f 0%, #d4c343 55%, #ef5350 100%);
    transition: width 0.8s ease-in-out;
}

.rdk-transfer-progress-line-value {
    margin-top: 6px;
    font-size: 15px;
    font-weight: 700;
    color: #3f556f;
}

.rdk-transfer-capacity-info {
    margin-top: 4px;
    font-size: 12px;
    color: #465b77;
    font-weight: 600;
}

@media (max-width: 991px) {
    .rdk-transfer-progress-line-wrap {
        padding-top: 0;
    }
}

@media (max-width: 767px) {
    .rdk-transfer-capacity-wrap {
        padding: 8px 8px 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rdk-transfer-capacity-enter {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* Ajustes por grid Bootstrap (12 / 6 / 4 / 3 columnas) */
.rdk-progress-wrap.rdk-progress-grid {
    --rdk-gauge-center-max-width: 90%;
}

.rdk-progress-wrap.rdk-progress-grid-12 {
    --rdk-gauge-score-size: clamp(36px, 6.8vw, 76px);
    --rdk-gauge-caption-size: clamp(14px, 2.2vw, 23px);
    --rdk-gauge-edge-size: clamp(15px, 2vw, 24px);
    --rdk-gauge-center-max-width: 88%;
    --rdk-gauge-edge-top: 86.5%;
    --rdk-gauge-center-top: 65%;
    --rdk-gauge-min-text-shift: 0px;
    --rdk-gauge-max-text-shift: 0px;
}

.rdk-progress-wrap.rdk-progress-grid-6 {
    --rdk-gauge-score-size: clamp(28px, 5vw, 56px);
    --rdk-gauge-caption-size: clamp(12px, 1.6vw, 18px);
    --rdk-gauge-edge-size: clamp(13px, 1.5vw, 19px);
    --rdk-gauge-center-max-width: 90%;
    --rdk-gauge-edge-top: 86.8%;
    --rdk-gauge-center-top: 62%;
    --rdk-gauge-min-text-shift: 0px;
    --rdk-gauge-max-text-shift: 0px;
}

.rdk-progress-wrap.rdk-progress-grid-4 {
    --rdk-gauge-score-size: clamp(24px, 4.5vw, 44px);
    --rdk-gauge-caption-size: clamp(11px, 1.5vw, 15px);
    --rdk-gauge-edge-size: clamp(12px, 1.45vw, 16px);
    --rdk-gauge-center-max-width: 94%;
    --rdk-gauge-edge-top: 87.2%;
    --rdk-gauge-center-top: 60%;
    --rdk-gauge-min-text-shift: 0px;
    --rdk-gauge-max-text-shift: 0px;
}

.rdk-progress-wrap.rdk-progress-grid-3 {
    --rdk-gauge-score-size: clamp(22px, 4.1vw, 38px);
    --rdk-gauge-caption-size: clamp(10px, 1.4vw, 14px);
    --rdk-gauge-edge-size: clamp(11px, 1.35vw, 15px);
    --rdk-gauge-center-max-width: 96%;
    --rdk-gauge-edge-top: 87.5%;
    --rdk-gauge-center-top: 59%;
    --rdk-gauge-min-text-shift: 0px;
    --rdk-gauge-max-text-shift: 0px;
}

@media (max-width: 1199px) {
    .rdk-progress-wrap {
        --rdk-gauge-score-size: clamp(24px, 4.9vw, 46px);
        --rdk-gauge-caption-size: clamp(11px, 1.85vw, 14px);
        --rdk-gauge-edge-size: clamp(13px, 2vw, 17px);
        --rdk-gauge-edge-top: 86.9%;
        --rdk-gauge-center-max-width: 92%;
    }

    .rdk-gauge {
        --rdk-gauge-min-text-shift: 0px;
        --rdk-gauge-max-text-shift: 0px;
    }

    .rdk-progress-wrap.rdk-progress-grid-12 {
        --rdk-gauge-score-size: clamp(32px, 7.1vw, 66px);
        --rdk-gauge-caption-size: clamp(14px, 2.45vw, 21px);
        --rdk-gauge-edge-size: clamp(14px, 2.15vw, 22px);
        --rdk-gauge-center-top: 64%;
        --rdk-gauge-min-text-shift: 0px;
        --rdk-gauge-max-text-shift: 0px;
    }

    .rdk-progress-wrap.rdk-progress-grid-6 {
        --rdk-gauge-score-size: clamp(27px, 5.6vw, 49px);
        --rdk-gauge-caption-size: clamp(12px, 2vw, 16px);
        --rdk-gauge-center-top: 61%;
        --rdk-gauge-min-text-shift: 0px;
        --rdk-gauge-max-text-shift: 0px;
    }

    .rdk-progress-wrap.rdk-progress-grid-4,
    .rdk-progress-wrap.rdk-progress-grid-3 {
        --rdk-gauge-score-size: clamp(22px, 5vw, 38px);
        --rdk-gauge-caption-size: clamp(11px, 1.9vw, 14px);
        --rdk-gauge-center-top: 59%;
        --rdk-gauge-min-text-shift: 0px;
        --rdk-gauge-max-text-shift: 0px;
    }
}

@media (max-width: 991px) {
    .rdk-progress-wrap {
        --rdk-gauge-score-size: clamp(22px, 6.2vw, 40px);
        --rdk-gauge-caption-size: clamp(10px, 2.3vw, 13px);
        --rdk-gauge-edge-size: clamp(12px, 2.45vw, 16px);
        --rdk-gauge-edge-top: 87.2%;
        --rdk-gauge-center-max-width: 94%;
    }

    .rdk-gauge {
        min-height: 120px;
        --rdk-gauge-min-text-shift: 0px;
        --rdk-gauge-max-text-shift: 0px;
    }

    .rdk-progress-wrap.rdk-progress-grid-12 {
        --rdk-gauge-score-size: clamp(30px, 7.9vw, 56px);
        --rdk-gauge-caption-size: clamp(13px, 3vw, 18px);
        --rdk-gauge-edge-size: clamp(13px, 2.5vw, 18px);
        --rdk-gauge-center-top: 63%;
    }

    .rdk-progress-wrap.rdk-progress-grid-6 {
        --rdk-gauge-score-size: clamp(25px, 6.4vw, 43px);
        --rdk-gauge-caption-size: clamp(11px, 2.5vw, 15px);
        --rdk-gauge-center-top: 60%;
        --rdk-gauge-min-text-shift: 0px;
        --rdk-gauge-max-text-shift: 0px;
    }

    .rdk-progress-wrap.rdk-progress-grid-4,
    .rdk-progress-wrap.rdk-progress-grid-3 {
        --rdk-gauge-score-size: clamp(21px, 5.9vw, 36px);
        --rdk-gauge-caption-size: clamp(11px, 2.3vw, 14px);
        --rdk-gauge-edge-size: clamp(11px, 2.1vw, 14px);
        --rdk-gauge-center-max-width: 96%;
        --rdk-gauge-center-top: 58%;
        --rdk-gauge-min-text-shift: 0px;
        --rdk-gauge-max-text-shift: 0px;
    }

    .rdk-gauge-track,
    .rdk-gauge-value {
        stroke-width: 9;
    }
}

@media (max-width: 767px) {
    .rdk-progress-wrap {
        --rdk-gauge-score-size: clamp(20px, 7.5vw, 34px);
        --rdk-gauge-caption-size: clamp(10px, 2.9vw, 12px);
        --rdk-gauge-edge-size: clamp(12px, 3.6vw, 15px);
        --rdk-gauge-edge-top: 87.8%;
        --rdk-gauge-center-shift-y: 2px;
        --rdk-gauge-center-max-width: 96%;
    }

    .rdk-gauge {
        aspect-ratio: 1.5 / 1;
        min-height: 108px;
        --rdk-gauge-min-text-shift: 0px;
        --rdk-gauge-max-text-shift: 0px;
    }

    .rdk-progress-wrap.rdk-progress-grid-12,
    .rdk-progress-wrap.rdk-progress-grid-6 {
        --rdk-gauge-score-size: clamp(24px, 7.9vw, 40px);
        --rdk-gauge-caption-size: clamp(11px, 3.2vw, 15px);
        --rdk-gauge-center-top: 58%;
        --rdk-gauge-min-text-shift: 0px;
        --rdk-gauge-max-text-shift: 0px;
    }

    .rdk-progress-wrap.rdk-progress-grid-4,
    .rdk-progress-wrap.rdk-progress-grid-3 {
        --rdk-gauge-score-size: clamp(20px, 7vw, 32px);
        --rdk-gauge-caption-size: clamp(10px, 2.8vw, 13px);
        --rdk-gauge-edge-size: clamp(11px, 2.75vw, 14px);
        --rdk-gauge-center-max-width: 98%;
        --rdk-gauge-center-top: 57%;
        --rdk-gauge-min-text-shift: 0px;
        --rdk-gauge-max-text-shift: 0px;
    }

    .rdk-gauge-min,
    .rdk-gauge-max {
        max-width: calc(50% - 2px);
    }
}

/* ================================================
   NAV-PILLS VARIANTES DE COLOR (REUTILIZABLE)
   ================================================ */
/* Uso: agregar rdk-nav-pill-warning o rdk-nav-pill-danger al <li> del nav */

.rdk-nav-pill-warning.active > a,
.rdk-nav-pill-warning.active > a:hover,
.rdk-nav-pill-warning.active > a:focus {
    background-color: #f0ad4e !important;
    border-color: #f0ad4e !important;
    color: #fff !important;
}

.rdk-nav-pill-warning > a:hover,
.rdk-nav-pill-warning > a:focus {
    background-color: #fde5b8 !important;
    border-color: #f0ad4e !important;
    color: #7a5200 !important;
}

.rdk-nav-pill-danger.active > a,
.rdk-nav-pill-danger.active > a:hover,
.rdk-nav-pill-danger.active > a:focus {
    background-color: #d9534f !important;
    border-color: #d9534f !important;
    color: #fff !important;
}

.rdk-nav-pill-danger > a:hover,
.rdk-nav-pill-danger > a:focus {
    background-color: #f9d0cf !important;
    border-color: #d9534f !important;
    color: #7a0e0c !important;
}

/* Ajustes visuales para badges dentro de nav-pills warning/danger */
.rdk-nav-pill-warning > a > b,
.rdk-nav-pill-danger > a > b {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.rdk-nav-pill-warning > a .badge,
.rdk-nav-pill-danger > a .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    min-width: 20px;
    min-height: 20px;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
    border: 1px solid transparent;
}

.rdk-nav-pill-warning > a .badge {
    background-color: #fff3cd !important;
    color: #8a6d3b !important;
    border-color: #f0d08a;
}

.rdk-nav-pill-warning.active > a .badge {
    background-color: #fff !important;
    color: #c77c11 !important;
    border-color: rgba(199, 124, 17, 0.25);
}

.rdk-nav-pill-danger > a .badge {
    background-color: #f8d7da !important;
    color: #a94442 !important;
    border-color: #e5a9a7;
}

.rdk-nav-pill-danger.active > a .badge {
    background-color: #fff !important;
    color: #c9302c !important;
    border-color: rgba(201, 48, 44, 0.25);
}

/* ================================================
   ESTILOS PARA LABELS DE BOOTSTRAP
   ================================================ */
.label {
    display: inline-block;
    min-width: 115px;
    text-align: center;
}

/* ================================================
   ESTILOS PARA TABLA CON SCROLL Y HEADER FIJO
   ================================================ */
.rdk-table {
    width: 100%;
    height: 500px;
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid #d9e6f7;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.rdk-table table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
}

.rdk-table thead {
    background-color: #f7f9fc;
    border-bottom: 2px solid #d9e6f7;
    z-index: 10;
}

.rdk-table.rdk-table-sticky thead {
    position: sticky;
    top: 0;
}

/* Fija la primera fila del tbody debajo del encabezado sticky */
.rdk-table.rdk-table-sticky.rdk-table-sticky-first-row {
    --rdk-sticky-first-row-top: 38px;
    --rdk-sticky-first-row-height: 58px;
}

.rdk-table.rdk-table-sticky.rdk-table-sticky-first-row tbody tr:first-child td {
    position: sticky;
    top: var(--rdk-sticky-first-row-top);
    z-index: 9;
    background-color: #ffffff;
    height: var(--rdk-sticky-first-row-height);
    min-height: var(--rdk-sticky-first-row-height);
    box-sizing: border-box;
    border-bottom: 1px solid #f0f3f8;
    box-shadow: inset 0 -1px 0 #f0f3f8;
}

.rdk-table.rdk-table-sticky.rdk-table-sticky-first-row thead tr > th:first-child,
.rdk-table.rdk-table-sticky.rdk-table-sticky-first-row thead tr > td:first-child,
.rdk-table.rdk-table-sticky.rdk-table-sticky-first-row tbody tr > td:first-child {
    width: 54px;
    min-width: 54px;
}

/* Conserva el hover nativo de Bootstrap (.table-hover) en la primera fila sticky */
.rdk-table.rdk-table-sticky.rdk-table-sticky-first-row table.table-hover > tbody > tr:first-child:hover > td {
    background-color: #f5f5f5;
}

.rdk-table thead tr {
    background-color: #f7f9fc;
}

.rdk-table thead th,
.rdk-table thead td {
    padding: 14px 12px;
    text-align: left;
    font-weight: 700;
    color: #3b4a63;
    border-right: 1px solid #e5eaf3;
    white-space: nowrap;
    background-color: #f7f9fc;
}

.rdk-table thead th:last-child,
.rdk-table thead td:last-child {
    border-right: none;
}

.rdk-table tbody tr {
    border-bottom: 1px solid #f0f3f8;
    transition: background-color 0.15s ease;
}

.rdk-table tbody tr:hover {
    background-color: #f9fafb;
}

.rdk-table tbody td {
    padding: 12px;
    border-right: 1px solid #f0f3f8;
    color: #5e6e89;
    font-size: 14px;
}

.rdk-table tbody td:last-child {
    border-right: none;
}

/* Altura configurable de la tabla */
.rdk-table.rdk-table-h-300 { height: 300px; }
.rdk-table.rdk-table-h-400 { height: 400px; }
.rdk-table.rdk-table-h-500 { height: 500px; }
.rdk-table.rdk-table-h-600 { height: 600px; }
.rdk-table.rdk-table-h-700 { height: 700px; }
.rdk-table.rdk-table-h-800 { height: 800px; }

/* Barra de scroll personalizada - Webkit browsers */
.rdk-table::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.rdk-table::-webkit-scrollbar-track {
    background: #f5f7fa;
    border-radius: 4px;
}

.rdk-table::-webkit-scrollbar-thumb {
    background: #b8c5d6;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.rdk-table::-webkit-scrollbar-thumb:hover {
    background: #8a96aa;
}

/* Firefox - scrollbar */
.rdk-table {
    scrollbar-width: thin;
    scrollbar-color: #b8c5d6 #f5f7fa;
}

/* Grid columns para 5 items (20% cada uno) */
.col-md-2-4 {
    width: 20%;
    padding: 15px;
    box-sizing: border-box;
    float: left;
}

.col-lg-2-4 {
    width: 20%;
    padding: 15px;
    box-sizing: border-box;
    float: left;
}

/* Media queries para responsive */
@media (max-width: 1199px) {
    .col-lg-2-4 {
        width: 25%;
    }
}

@media (max-width: 991px) {
    .col-md-2-4 {
        width: 25%;
    }
}

@media (max-width: 767px) {
    .col-md-2-4,
    .col-lg-2-4 {
        width: 50%;
    }
}

@media (max-width: 480px) {
    .col-md-2-4,
    .col-lg-2-4 {
        width: 100%;
    }
}

/* ================================================
   TEXTAREA EDITOR - Editor con líneas y controles
   ================================================ */

.rdk-textarea-wrapper {
    display: flex;
    flex-direction: column;
    border: 1px solid #d9e6f7;
    border-radius: 4px;
    background: #f7f9fc;
    overflow: hidden;
}

.rdk-textarea-toolbar {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    background: #f0f5fb;
    border-bottom: 1px solid #d9e6f7;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
}

.rdk-textarea-content {
    display: flex;
    flex-direction: row;
    overflow: hidden;
    height: 100%;
}

.rdk-textarea-line-numbers {
    background: #f0f5fb;
    border-right: 1px solid #d9e6f7;
    padding: 10px 8px;
    color: #7d8ea2;
    font-size: var(--rdk-textarea-font-size, 13px);
    font-family: 'Courier New', monospace;
    line-height: 1.5;
    text-align: right;
    user-select: none;
    overflow-y: scroll;
    overflow-x: hidden;
    white-space: pre;
    word-break: break-word;
    flex-shrink: 0;
    height: 100%;
    scrollbar-width: none;
}

.rdk-textarea-line-numbers::-webkit-scrollbar {
    display: none;
}

.rdk-textarea-field {
    flex: 1;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.rdk-textarea-field textarea {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    font-family: 'Courier New', monospace;
    font-size: var(--rdk-textarea-font-size, 13px);
    padding: 10px 15px;
    resize: none;
    color: #3b4a63;
    line-height: 1.5;
    outline: none;
    overflow-y: auto;
}

.rdk-textarea-field textarea::placeholder {
    color: #b8c5d6;
}

.rdk-textarea-footer {
    display: flex;
    gap: 15px;
    padding: 8px 12px;
    background: #f0f5fb;
    border-top: 1px solid #d9e6f7;
    align-items: center;
    flex-wrap: wrap;
    font-size: 11px;
    color: #536b88;
}

.rdk-textarea-info {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rdk-textarea-info strong {
    color: #3b4a63;
    font-weight: 600;
}

.rdk-textarea-goto-line {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rdk-textarea-goto-line label {
    font-weight: 600;
    color: #3b4a63;
    margin: 0;
    font-size: 11px;
}

.rdk-textarea-goto-line input {
    width: 50px;
    padding: 4px 6px;
    border: 1px solid #d9e6f7;
    border-radius: 3px;
    font-size: 11px;
    text-align: center;
}

.rdk-textarea-goto-line button {
    padding: 4px 10px;
    font-size: 11px;
    background: #3085d6;
    border: 1px solid #2e6da4;
    border-radius: 3px;
    cursor: pointer;
    color: #fff;
    font-weight: 500;
    height: 28px;
}

.rdk-textarea-goto-line button:hover {
    background: #2e6da4;
}

.rdk-textarea-font-size {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rdk-textarea-font-size label {
    font-weight: 600;
    color: #3b4a63;
    margin: 0;
    font-size: 11px;
}

.rdk-textarea-font-size button {
    width: 28px;
    height: 28px;
    padding: 0;
    background: #3085d6;
    border: 1px solid #2e6da4;
    border-radius: 3px;
    cursor: pointer;
    color: #fff;
    font-size: 11px;
}

.rdk-textarea-font-size button:hover {
    background: #2e6da4;
}

.rdk-textarea-font-size span {
    min-width: 34px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #3b4a63;
}

/* ================================================
   PIPAS (TRANSPORTES) - CARRUSEL HORIZONTAL
   3 visibles a la vez, desliza de derecha a izquierda.
   ================================================ */

.rdk-ft-section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e4e9ef;
    font-size: 15px;
    font-weight: 700;
    color: #37474f;
}

.rdk-ft-section-label i {
    color: #2f5f8a;
}

.rdk-ft-carousel-viewport {
    overflow: hidden;
    width: 100%;
}

/* Fundido en los bordes: solo se activa (vía JS) cuando hay más de 3 pipas
   y el carrusel realmente se desliza, como pista visual de que hay más. */
.rdk-ft-carousel-viewport.rdk-ft-carousel-active {
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
    mask-image: linear-gradient(to right, transparent 0, #000 20px, #000 calc(100% - 20px), transparent 100%);
}

.rdk-ft-carousel-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    will-change: transform;
    user-select: none;
    -webkit-user-drag: none;
}

/* Arrastrable con mouse o touch: pausa el auto-slide y sigue al cursor/dedo. */
.rdk-ft-carousel-track-draggable {
    cursor: grab;
    touch-action: pan-y;
}

.rdk-ft-carousel-track-draggable.rdk-ft-carousel-track-grabbing {
    cursor: grabbing;
}

.rdk-ft-carousel-track img,
.rdk-ft-carousel-track svg {
    -webkit-user-drag: none;
    pointer-events: none;
}

.rdk-ft-cell {
    flex: 0 0 calc((100% - 20px) / 3);
    max-width: calc((100% - 20px) / 3);
    box-sizing: border-box;
}

/* Tarjeta de pipa: acento superior + hover con elevación (el carrusel se
   pausa al pasar el mouse, así que "levantar" la tarjeta es seguro). */
.rdk-ft-cell .rdk-card {
    padding: 9px 10px 8px;
    min-height: 0;
    border-top: 2px solid #6ea8d8;
    border-radius: 9px;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-top-color 0.2s ease;
}

.rdk-ft-cell .rdk-card:hover {
    box-shadow: 0 12px 26px rgba(20, 48, 75, 0.16);
    transform: translateY(-2px);
    border-top-color: #2f5f8a;
}

.rdk-ft-svg {
    display: block;
    width: 100%;
    height: auto;
}

.rdk-ft-lvl {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.rdk-ft-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    margin-bottom: 5px;
}

.rdk-ft-name {
    font-size: 11px;
    font-weight: 700;
    color: #37474f;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rdk-ft-name i {
    color: #6ea8d8;
}

.rdk-ft-occ {
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 12px;
    white-space: nowrap;
    color: #2f4f75;
    background: #e8eef6;
}

/* Semáforo de nivel: mismo criterio rojo/ámbar/verde que el arco del gauge de tanques. */
.rdk-ft-occ-low {
    color: #b3261e;
    background: #fbe4e2;
}

.rdk-ft-occ-mid {
    color: #9a6400;
    background: #fdecd2;
}

.rdk-ft-occ-high {
    color: #1e7d43;
    background: #ddf3e4;
}

.rdk-ft-body {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
}

.rdk-ft-truck-col {
    flex: 0 0 56%;
    max-width: 56%;
    min-width: 0;
}

.rdk-ft-info-col {
    flex: 1 1 auto;
    min-width: 0;
}

.rdk-ft-cap-info {
    margin-top: 2px;
    font-size: 10px;
    color: #6b7785;
    text-align: center;
}

.rdk-ft-cap-info i {
    color: #6ea8d8;
    margin-right: 3px;
}

.rdk-ft-products {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rdk-ft-product-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 5px;
    font-size: 10px;
}

.rdk-ft-product-row + .rdk-ft-product-row {
    padding-top: 3px;
    border-top: 1px dashed #e4e9ef;
}

.rdk-ft-prod-swatch {
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 2px;
}

.rdk-ft-prod-name {
    flex: 1 1 auto;
    font-weight: 700;
    color: #37474f;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rdk-ft-prod-stats {
    flex: 1 0 100%;
    padding-left: 12px;
    text-align: left;
    color: #6b7785;
    line-height: 1.15;
}

.rdk-ft-prod-avail {
    font-size: 9px;
    color: #8a94a3;
}

.rdk-ft-empty-prods {
    text-align: center;
    color: #9aa4b2;
    font-size: 10px;
    padding: 3px 0 1px;
}

@media (max-width: 991px) {
    .rdk-ft-cell {
        flex-basis: calc((100% - 10px) / 2);
        max-width: calc((100% - 10px) / 2);
    }
}

@media (max-width: 767px) {
    .rdk-ft-cell {
        flex-basis: 100%;
        max-width: 100%;
    }
}

/* ================================================
   FUEL INVENTORY - MODO ENFOQUE (PANTALLA COMPLETA)
   ================================================ */

.fuel-focus-open-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 58px;
    height: 58px;
    border-radius: 18px;
    border: 1px solid #264868;
    background: linear-gradient(140deg, #2f5f8a 0%, #244e74 50%, #1d3d5a 100%);
    color: #fff;
    box-shadow: 0 10px 24px rgba(20, 48, 75, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    z-index: 1100;
    font-size: 21px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform .22s cubic-bezier(.22,.61,.36,1), box-shadow .22s ease, background .22s ease, border-color .22s ease;
    animation: fuel-focus-float-pulse 3.2s ease-in-out infinite;
    backdrop-filter: blur(2px);
}

.fuel-focus-open-btn::before {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 22px;
    border: 1px solid rgba(56, 120, 176, 0.36);
    opacity: 0;
    transform: scale(0.95);
    transition: opacity .22s ease, transform .22s ease;
    pointer-events: none;
}

.fuel-focus-open-btn:hover,
.fuel-focus-open-btn:focus {
    color: #fff;
    transform: translateY(-2px) scale(1.03);
    background: linear-gradient(140deg, #3b709f 0%, #2b5b84 55%, #214764 100%);
    border-color: #2c5d89;
    box-shadow: 0 14px 30px rgba(20, 48, 75, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.24);
    outline: none;
}

.fuel-focus-open-btn:hover::before,
.fuel-focus-open-btn:focus::before {
    opacity: 1;
    transform: scale(1);
}

.fuel-focus-open-btn:active {
    transform: translateY(0) scale(0.98);
}

.fuel-focus-close-btn {
    display: none;
    background: linear-gradient(140deg, #da6258 0%, #c24c44 52%, #a93a34 100%);
    border-color: #92332e;
    animation: fuel-focus-close-in 0.24s ease;
}

.fuel-focus-close-btn:hover,
.fuel-focus-close-btn:focus {
    background: linear-gradient(140deg, #e07167 0%, #ca5750 52%, #b0413b 100%);
    border-color: #9f3a35;
}

.fuel-focus-close-btn::before {
    border-color: rgba(214, 92, 84, 0.38);
}

.fuel-inventory-page.fuel-inventory-focus-on {
    overflow: hidden;
}

.fuel-inventory-page.fuel-inventory-focus-on .top_nav,
.fuel-inventory-page.fuel-inventory-focus-on .left_col,
.fuel-inventory-page.fuel-inventory-focus-on .sidebar-footer,
.fuel-inventory-page.fuel-inventory-focus-on footer {
    display: none !important;
}

.fuel-inventory-page.fuel-inventory-focus-on .container.body,
.fuel-inventory-page.fuel-inventory-focus-on .main_container {
    min-height: 100vh;
}

.fuel-inventory-page.fuel-inventory-focus-on #fuel-inventory-main {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin-left: 0 !important;
    width: 100% !important;
    padding: 10px 14px;
    z-index: 1090;
    overflow-y: auto;
    background: #eef2f6;
}

.fuel-inventory-page.fuel-inventory-focus-on #fuel-inventory-main .x_panel {
    margin-bottom: 0;
    border-radius: 8px;
    min-height: calc(100vh - 20px);
}

.fuel-inventory-page.fuel-inventory-focus-on.fuel-inventory-focus-entering #fuel-inventory-main {
    animation: fuel-focus-enter 0.28s cubic-bezier(.22,.61,.36,1);
}

.fuel-inventory-page.fuel-inventory-focus-on.fuel-inventory-focus-entering #fuel-inventory-main .x_panel {
    animation: fuel-panel-enter 0.32s cubic-bezier(.22,.61,.36,1);
}

.fuel-inventory-page.fuel-inventory-focus-on #fuel-inventory-main .x_title {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 8px 10px;
}

.fuel-inventory-page.fuel-inventory-focus-on #fuel-inventory-main .x_title h2,
.fuel-inventory-page.fuel-inventory-focus-on #fuel-inventory-main .fuel-inventory-panel-toolbox > li:not(.fuel-last-update-item) {
    display: none !important;
}

.fuel-inventory-page.fuel-inventory-focus-on #fuel-inventory-main .fuel-inventory-panel-toolbox {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fuel-inventory-page.fuel-inventory-focus-on #fuel-inventory-main .fuel-last-update-item {
    margin: 0 !important;
    animation: fuel-last-update-in 0.26s ease;
}

.fuel-inventory-page.fuel-inventory-focus-on #fuel-inventory-main .x_content {
    padding-top: 6px;
}

.fuel-inventory-page.fuel-inventory-focus-on .fuel-inventory-charts.container {
    width: 100%;
    max-width: none;
    padding-left: 2px;
    padding-right: 2px;
}

.fuel-inventory-page.fuel-inventory-focus-on .fuel-focus-open-btn {
    display: none;
    animation: none;
}

.fuel-inventory-page.fuel-inventory-focus-on .fuel-focus-close-btn {
    display: inline-flex;
}

@keyframes fuel-focus-enter {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes fuel-panel-enter {
    0% {
        opacity: 0;
        transform: translateY(12px) scale(0.995);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fuel-last-update-in {
    0% {
        opacity: 0;
        transform: translateY(-4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fuel-focus-close-in {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fuel-focus-float-pulse {
    0%, 100% {
        box-shadow: 0 10px 24px rgba(20, 48, 75, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.18);
        transform: translateY(0);
    }
    50% {
        box-shadow: 0 14px 30px rgba(20, 48, 75, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.24);
        transform: translateY(-1px);
    }
}

@media (prefers-reduced-motion: reduce) {
    .fuel-focus-open-btn,
    .fuel-focus-close-btn,
    .fuel-inventory-page.fuel-inventory-focus-on #fuel-inventory-main,
    .fuel-inventory-page.fuel-inventory-focus-on #fuel-inventory-main .x_panel,
    .fuel-inventory-page.fuel-inventory-focus-on #fuel-inventory-main .fuel-last-update-item,
    .fuel-inventory-carousel-sucursal,
    .fuel-inventory-carousel-counter {
        animation: none !important;
        transition: none !important;
    }
}

/* En modo fullscreen, limita tipografia del gauge para evitar solapes. */
.fuel-inventory-page.fuel-inventory-focus-on .rdk-gauge {
    --rdk-gauge-score-size: clamp(22px, 6.4vw, 56px);
    --rdk-gauge-caption-size: clamp(10px, 1.8vw, 14px);
    --rdk-gauge-edge-size: clamp(10px, 1.9vw, 15px);
}

.fuel-inventory-page.fuel-inventory-focus-on .rdk-gauge-center {
    bottom: 16%;
    padding: 0 16px;
}

.fuel-inventory-carousel-header {
    text-align: center;
    margin-bottom: 14px;
    padding: 0 10px;
}

/* Antes no ocultaba nada: is-empty se togglea en JS pero no tenía regla asociada. */
.fuel-inventory-carousel-header.is-empty {
    display: none;
}

.fuel-inventory-carousel-header h3 {
    font-size: clamp(16px, 2.6vw, 24px);
    font-weight: 700;
    margin: 0 0 6px;
    color: #1a3a52;
}

.fuel-inventory-carousel-header .fuel-carousel-subtitle {
    font-size: clamp(11px, 1.4vw, 13px);
    color: #5a7182;
    margin: 0;
}

.fuel-inventory-carousel-header-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-bottom: 6px;
}

.fuel-inventory-carousel-header-main i {
    color: #2f5f8a;
    font-size: 14px;
}

.fuel-inventory-carousel-sucursal {
    display: none;
    opacity: 0;
    font-size: 17px;
    font-weight: 700;
    color: #1a3a52;
    letter-spacing: 0.2px;
}

.fuel-inventory-carousel-sucursal.active {
    display: inline-block;
    animation: fuelCarouselFadeIn 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fuelCarouselFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.96);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Micro-animaciones al cambiar de sucursal/página (JS ya las dispara, faltaba el CSS). */
@keyframes fuelInventoryTextRise {
    0% { opacity: 0; transform: translateY(6px); }
    100% { opacity: 1; transform: translateY(0); }
}

.fuel-inventory-text-rise {
    animation: fuelInventoryTextRise 0.28s ease;
}

.fuel-inventory-chip-text-rise {
    animation: fuelInventoryTextRise 0.24s ease;
}

@keyframes fuelInventoryChipRise {
    0% { opacity: 0.5; transform: scale(0.94); }
    100% { opacity: 1; transform: scale(1); }
}

.fuel-inventory-chip-rise {
    animation: fuelInventoryChipRise 0.24s ease;
}

.fuel-inventory-carousel-counter {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 12px;
    background: #f8fafc;
    border: 1px solid #cfd8e3;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #6b7785;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.fuel-inventory-carousel-counter span {
    color: #2f4f75;
}

.fuel-carousel-btn {
    background: #fff;
    border: 1.5px solid #d4dfe8;
    color: #1a3a52;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: clamp(11px, 1.4vw, 13px);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.fuel-carousel-btn:hover {
    background: #e8f4fb;
    border-color: #26a69a;
    color: #1a3a52;
    box-shadow: 0 3px 8px rgba(38, 166, 154, 0.16);
    transform: translateY(-1px);
}

.fuel-carousel-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(38, 166, 154, 0.2);
}

.fuel-carousel-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f5f7f9;
    border-color: #e0e6eb;
}

.fuel-carousel-btn:disabled:hover {
    background: #f5f7f9;
    border-color: #e0e6eb;
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.fuel-carousel-counter-text {
    font-size: clamp(11px, 1.4vw, 13px);
    font-weight: 600;
    color: #5a7182;
}

/* Las tarjetas de pipa usan la misma tipografía compacta en vista normal y en
   modo enfoque/pantalla completa — antes este bloque la volvía a agrandar
   (14-20px) y un media query sin scope la reescribía otra vez en <1199px,
   así que el ajuste de tamaño de la vista normal nunca llegaba a aplicarse
   ahí. Se elimina para que ambas vistas queden consistentes. */

/* ---------------- Mobile + Tablet Overrides ---------------- */
@media (max-width: 1199px) {
    .fuel-focus-open-btn {
        padding: 7px 15px;
        font-size: 11px;
    }
}
