/* Asegura visibilidad de pestañas personalizadas */
.tab-content .tab-pane {
    display: none;
}

.tab-content .tab-pane.active {
    display: block;
}

/* Add this at the top of your CSS file */
html {
    font-size: 80%;
}

body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    font-family: 'Poppins', sans-serif !important;
}

/* Forzar estilo oscuro consistente del modal y evitar superposición */
.modal-backdrop.show {
    opacity: 0.6 !important;
}

.modal {
    z-index: 2000 !important;
}

.modal-dialog {
    z-index: 2001 !important;
}

.modal-content {
    background-color: var(--bg-secondary) !important;
    /* fuerza fondo oscuro */
    color: var(--text-primary) !important;
    border: 1px solid rgba(30, 144, 255, 0.2) !important;
    border-radius: 12px !important;
}

.modal-header,
.modal-footer {
    background-color: var(--bg-secondary) !important;
    border-color: rgba(30, 144, 255, 0.1) !important;
}

.btn-close {
    filter: invert(1);
}

.alert.alert-contrast {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(22, 27, 38, 0.94);
    color: #f8fafc !important;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 18px 35px rgba(10, 12, 30, 0.45);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.alert.alert-contrast.alert-danger {
    border-color: rgba(248, 113, 113, 0.65);
    background: rgba(127, 29, 29, 0.95);
}

.alert.alert-contrast.alert-info {
    border-color: rgba(96, 165, 250, 0.65);
    background: rgba(15, 48, 85, 0.95);
}

#tabAuthError.alert {
    background: #5b3a00 !important;
    border-color: #ffbb33 !important;
    color: #ffe9c0 !important;
    font-weight: 600;
}

.totp-unavailable-alert {
    background: rgba(91, 58, 0, 0.35);
    border: 1px solid rgba(255, 187, 51, 0.6);
    color: #ffe9c0;
    padding: 1rem;
    border-radius: 0.85rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.modal .form-control,
.modal .form-select {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

.modal label,
.modal .form-label {
    color: var(--text-primary) !important;
}

.modal ::placeholder {
    color: rgba(255, 255, 255, 0.55) !important;
}

/* Fix CSS var scope */
:root {
    /* Colores base */
    --bg-primary: #121820;
    /* Fondo principal */
    --bg-secondary: #1A1F27;
    /* Fondos secundarios */
    --bg-dark: #141b23;
    /* Fondo de tablas/inputs */
    --bg-light: #1A1F27;
    /* Fondo intermedio */
    --bg-darker: #0b1016;
    /* Fondo más oscuro */
    --accent-primary: #1E90FF;
    /* Color de acento principal */
    --accent-hover: #008CFF;
    /* Botones resaltados */

    /* Indicadores */
    --success: #2AC769;
    /* Verde para valores positivos */
    --danger: #D9374A;
    /* Rojo para valores negativos */

    /* Texto */
    --text-primary: #E0E4E7;
    /* Texto principal */
    --text-secondary: #848E9C;
    /* Texto secundario */
}

/* Navigation */
.nav-tabs {
    border-bottom: 1px solid #4000c2 !important;
}

.nav-tabs .nav-link {
    color: var(--text-primary) !important;
    border: none !important;
    background-color: transparent !important;
}

.nav-tabs .nav-link.active {
    background-color: #4000c2 !important;
    color: var(--text-primary) !important;
    border: 1px solid #4000c2 !important;
}

/* Navbar */
.navbar.navbar-expand-lg.navbar-dark.bg-primary {
    background-color: #4000c2 !important;
}

.navbar-brand,
.nav-link {
    color: var(--text-primary) !important;
}

.nav-link:hover {
    color: #ffffff !important;
}

/* Cards */
.card {
    background-color: var(--bg-secondary) !important;
    border: 1px solid var(--accent-primary) !important;
    margin-bottom: 1rem !important;
}

.card-body {
    background-color: var(--bg-dark) !important;
}

/* Forms */
.form-control,
.form-select {
    background-color: var(--bg-primary) !important;
    border: 1px solid var(--accent-primary) !important;
    color: var(--text-primary) !important;
}

.form-control:focus,
.form-select:focus {
    background-color: var(--bg-primary) !important;
    box-shadow: #4000c2 !important;
    color: var(--text-primary) !important;
}

.form-label {
    color: #ffffff !important;
    font-weight: 500 !important;
}

/* Select dropdown */
.form-select option {
    background-color: var(--bg-dark) !important;
    color: var(--text-primary) !important;
}

/* Buttons */
.btn-primary {
    background-color: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
    color: white !important;
}

.btn-primary:hover {
    background-color: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
}

.quick-duration {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.quick-duration span {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.quick-duration .quick-btn {
    padding: 0.25rem 0.85rem;
    border-radius: 999px;
}

.pending-form .row {
    align-items: center;
}

.manual-subscription-form {
    background-color: var(--bg-dark);
    border: 1px solid rgba(64, 0, 194, 0.4);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 18px 35px rgba(10, 12, 30, 0.35);
}

.manual-subscription-form .form-label {
    color: var(--text-primary) !important;
}

.manual-subscription-form .form-select,
.manual-subscription-form .form-control {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(64, 0, 194, 0.4) !important;
}

.manual-subscription-form .quick-duration {
    justify-content: flex-end;
}

/* Tables */
.table {
    color: var(--text-primary) !important;
}

.table thead th {
    background-color: #4000c2 !important;
    color: white !important;
}

.table tbody td {
    background-color: var(--bg-dark) !important;
    color: var(--text-primary) !important;
    border-color: rgba(157, 0, 255, 0.2) !important;
}


.tab-pane {
    color: var(--text-primary) !important;
}

/* Text colors */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: #ffffff !important;
}

.h5,
h5 {
    font-size: 1.1rem;
    margin-top: 15px;
}

p,
span,
div {
    color: var(--text-primary) !important;
}


/* Inputs placeholder */
::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Table striped rows */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--bg-darker) !important;
}

.table-striped tbody tr:nth-of-type(even) {
    background-color: var(--bg-dark) !important;
}

/* Button variants */
.btn-danger {
    background-color: #ff4444 !important;
    border-color: #ff4444 !important;
    color: var(--text-primary) !important;
}

.btn-warning {
    background-color: #ffbb33 !important;
    border-color: #ffbb33 !important;
    color: var(--bg-darker) !important;
}

/* Login specific */
.login-container {
    margin-top: 100px !important;
}

.login-card {
    max-width: 400px !important;
    margin: 0 auto !important;
}

.password-recovery-wrapper {
    display: none;
}

.password-recovery-wrapper.show {
    display: block;
    animation: fadeIn 0.25s ease-in-out;
}

.recovery-card {
    border: 1px solid rgba(64, 0, 194, 0.35) !important;
    background-color: var(--bg-primary) !important;
}

.password-recovery-form .form-control {
    border-color: rgba(255, 255, 255, 0.25) !important;
}

.password-recovery-form .form-label {
    font-size: 0.9rem;
    color: var(--text-primary) !important;
}

.recovery-instructions {
    font-size: 0.9rem;
    color: var(--text-secondary) !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chart containers */
canvas {
    background-color: var(--bg-dark) !important;
    border: 1px solid #4000c2 !important;
    border-radius: 4px !important;
    padding: 10px !important;
}

/* Force all text to be white by default */
* {
    color: var(--text-primary) !important;
}

/* Tables - specific overrides for visibility */
.table {
    background-color: var(--bg-dark) !important;
}

.table tbody tr {
    background-color: var(--bg-light) !important;
}

.table tbody td {
    color: white !important;
}

/* Table striping */
.table-striped>tbody>tr:nth-of-type(odd) {
    background-color: var(--bg-dark) !important;
}

.table-striped>tbody>tr:nth-of-type(even) {
    background-color: var(--bg-light) !important;
}

/* Cards */
.card {
    background-color: var(--bg-dark) !important;
    border: 1px solid #4000c2 !important;
}

.card-header {
    background-color: #4000c2 !important;
    color: white !important;
    padding-top: 15px;
}

.card-body {
    background-color: var(--bg-dark) !important;
}

/* Navigation */
.navbar {
    background-color: var(--accent) !important;
}

.nav-link {
    color: white !important;
}

/* Test border to verify CSS is loading */
.test-border {
    border: 5px solid var(--accent) !important;
}

/* Client search results styling */
.hover-bg-accent:hover {
    background-color: var(--accent) !important;
    cursor: pointer;
}

#clientSearchResults {
    background-color: #1A1F27 !important;
    border: 1px solid var(--accent-primary);
    border-radius: 0.5rem;
    padding: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    position: absolute;
    z-index: 9999;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
}

/* Ocultar el dropdown de búsqueda cuando hay un modal abierto */
.modal-open #clientSearchResults {
    display: none !important;
}

.modal-open #operationClientName {
    z-index: 0 !important;
}

.modal-open .position-relative {
    z-index: 0 !important;
}

#clientSearchResults>div {
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: white !important;
    background-color: #1A1F27 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2px;
    font-weight: 500;
    display: block;
    width: 100%;
}

#clientSearchResults>div:hover {
    background-color: var(--accent-primary) !important;
    color: white !important;
}

/* Asegurar que el contenedor de resultados esté por encima de otros elementos */
.position-relative {
    position: relative;
    z-index: auto !important;
    /* Evita que elementos comunes queden por encima del modal */
}

#operationClientName {
    background-color: var(--bg-primary) !important;
    color: white !important;
    border: 1px solid var(--accent-primary) !important;
    position: relative;
    z-index: auto !important;
}

#operationClientName:focus {
    border-color: var(--accent-hover) !important;
    box-shadow: 0 0 0 0.2rem rgba(30, 144, 255, 0.25) !important;
}

/* Modificar el contenedor principal para usar flexbox */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 56px);
    font-size: 0.9rem;
}

/* Estilos para la navegación vertical */
.nav-tabs.vertical-tabs {
    flex: 0 0 250px;
    /* Un poco más ancho para acomodar el contenido */
    display: flex;
    flex-direction: column;
    height: 100vh;
    /* Altura completa */
    background-color: var(--bg-secondary);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    position: fixed;
    /* Mantiene el sidebar fijo */
    left: 0;
    top: 0;
}

/* Estilos para el header del sidebar */
.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(30, 144, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header .brand {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.user-section {
    padding: 0.9rem 1.2rem;
    border-bottom: 1px solid rgba(30, 144, 255, 0.1);
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* Ajustar el contenido principal */
.main-content {
    margin-left: 250px;
    width: calc(100% - 250px);
    min-height: 100vh;
    background-color: var(--bg-primary);
    padding: 1.5rem;
    font-size: 0.9rem;
}

.movements-table-wrapper {
    max-height: 360px;
    overflow-y: auto;
    overflow-x: hidden;
}

.movements-table {
    font-size: 0.85rem;
}

.movements-table th,
.movements-table td {
    white-space: nowrap;
}

.movements-table td:nth-child(6) {
    white-space: normal;
}

.operator-balance-table-wrapper {
    flex: 1;
    max-height: 360px;
    overflow-y: auto;
    overflow-x: hidden;
}

.operator-balance-table {
    font-size: 0.85rem;
}

.history-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 30px;
    padding: 0 0.6rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    color: #000000 !important;
    background: rgba(255, 255, 255, 0.2);
}

.history-badge-pending {
    background: #ffe066;
    box-shadow: 0 4px 12px rgba(255, 224, 102, 0.3);
}

.history-badge-finalized {
    background: #7eff7e;
    box-shadow: 0 4px 12px rgba(126, 255, 126, 0.3);
}

.notification-container {
    position: fixed;
    top: 80px;
    right: 24px;
    width: min(320px, 90vw);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.app-notification {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    padding: 1rem 1.25rem;
    background: rgba(20, 25, 38, 0.95);
    border-left: 4px solid var(--accent-primary);
    color: var(--text-primary);
    animation: slideInRight 0.3s ease-out;
}

.app-notification.success {
    border-color: #2ecc71;
}

.app-notification.error {
    border-color: #e74c3c;
}

.app-notification.warning {
    border-color: #f1c40f;
}

.app-notification .title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.app-notification .message {
    font-size: 0.85rem;
    line-height: 1.4;
}

.app-notification .close-btn {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.7;
    font-size: 1rem;
    position: absolute;
    top: 6px;
    right: 12px;
    cursor: pointer;
}

.app-notification .close-btn:hover {
    opacity: 1;
}

@keyframes slideInRight {
    from {
        transform: translateX(40px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Estilos para los items del menú */
.nav-tabs.vertical-tabs .nav-item {
    margin: 0.2rem 0.8rem;
}

.nav-tabs.vertical-tabs .nav-link {
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

/* Hover state */
.nav-tabs.vertical-tabs .nav-link:hover {
    background-color: rgba(30, 144, 255, 0.1);
    color: var(--accent-primary) !important;
}

/* Active state */
.nav-tabs.vertical-tabs .nav-link.active {
    background-color: var(--accent-primary) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(30, 144, 255, 0.3);
}

/* Iconos en el menú */
.nav-tabs.vertical-tabs .nav-link i {
    font-size: 0.9rem;
    width: 20px;
    text-align: center;
    color: inherit;
}

/* Item activo */
.nav-tabs.vertical-tabs .nav-item .nav-link.active {
    background-color: var(--accent-primary) !important;
    border: none;
    box-shadow: 0 4px 12px rgba(30, 144, 255, 0.3);
}

/* Primer item (Operaciones) siempre con el color de acento */
.nav-tabs.vertical-tabs .nav-item:first-child .nav-link {
    background-color: var(--accent-primary);
    color: white !important;
}

.nav-tabs.vertical-tabs .nav-item:first-child .nav-link:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

/* Logout button en la parte inferior del sidebar */
.sidebar-footer {
    margin-top: auto;
    padding: 1.5rem;
    border-top: 1px solid rgba(30, 144, 255, 0.1);
}

.logout-btn {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    background-color: rgba(217, 55, 74, 0.1);
    color: var(--danger);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background-color: var(--danger);
    color: white;
}

/* Cards mejorados */
.card {
    background-color: var(--bg-secondary);
    border: none !important;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: var(--bg-secondary) !important;
    border-bottom: 1px solid rgba(30, 144, 255, 0.1);
    padding: 1rem 1.25rem;
    border-radius: 12px 12px 0 0 !important;
}

.card-body {
    background-color: var(--bg-secondary) !important;
    padding: 1.25rem;
}

.card-body h5 {
    font-weight: 600;
    color: var(--text-primary);
}

.card-body form .form-label {
    font-size: 0.85rem;
}

/* Formularios mejorados */
.form-control,
.form-select {
    background-color: var(--bg-primary) !important;
    border: 1px solid rgba(30, 144, 255, 0.2) !important;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.15) !important;
}

/* Botones mejorados */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--accent-primary);
    border: none;
    box-shadow: 0 4px 12px rgba(30, 144, 255, 0.3);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(30, 144, 255, 0.4);
}

.btn-danger {
    background-color: var(--danger);
    border: none;
    box-shadow: 0 4px 12px rgba(217, 55, 74, 0.3);
}

/* Tablas mejoradas */
.table {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(30, 144, 255, 0.1);
}

.table thead th {
    background-color: var(--bg-secondary) !important;
    border-bottom: 2px solid rgba(30, 144, 255, 0.1);
    padding: 1rem;
    font-weight: 600;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

/* Navbar mejorada */
.navbar {
    background-color: var(--bg-secondary) !important;
    padding: 1rem 2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Búsqueda de clientes mejorada */
#clientSearchResults {
    background-color: var(--bg-secondary);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    margin-top: 5px;
}

#clientSearchResults div {
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

#clientSearchResults div:hover {
    background-color: rgba(30, 144, 255, 0.1);
}

/* Panic Button mejorado */
#panicButton {
    background-color: var(--danger);
    border: none;
    box-shadow: 0 4px 12px rgba(217, 55, 74, 0.3);
    transition: all 0.2s ease;
}

#panicButton:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(217, 55, 74, 0.4);
}

/* Espaciado y alineación */
.row {
    margin: 0 -0.75rem;
}

.col,
[class*="col-"] {
    padding: 0 0.75rem;
}

/* Scrollbars personalizados */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* Estilos para el campo de fecha/hora */
input[type="datetime-local"] {
    background-color: var(--bg-primary) !important;
    border: 1px solid rgba(30, 144, 255, 0.2) !important;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-primary) !important;
    transition: all 0.2s ease;
}

input[type="datetime-local"]:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.15) !important;
}

/* Estilos para los estados */
#operationStatus option[value="Nuevo"] {
    color: var(--accent-primary);
}

#operationStatus option[value="Pendiente"] {
    color: #FFA500;
    /* Naranja para pendiente */
}

#operationStatus option[value="Finalizado"] {
    color: var(--success);
}

#operationStatus option[value="Cancelado"] {
    color: var(--danger);
}

#cashCloseNotice {
    background-color: rgba(15, 25, 40, 0.95) !important;
    border: 1px solid rgba(0, 173, 255, 0.35) !important;
    color: var(--text-primary) !important;
    font-weight: 500;
}

/* Agregar al final del archivo */
.info-box {
    background-color: var(--bg-primary);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--accent-primary);
}

.info-box h5 {
    color: var(--text-secondary) !important;
    margin-bottom: 1rem;
}

.info-box h3 {
    font-size: 1.6rem;
    margin: 0;
}

#variacionValue.positive {
    color: var(--success) !important;
}

#variacionValue.negative {
    color: var(--danger) !important;
}

.info-box small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary) !important;
}

.text-muted {
    color: var(--text-secondary) !important;
}

/* Estilos para las tarjetas de precios */
.price-card {
    background-color: var(--bg-secondary);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.price-header {
    background-color: var(--bg-secondary);
    padding: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.price-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary) !important;
}

.price-body {
    padding: 0.9rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.price-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.price-value {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}

.price-detail {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Estilos para la variación */
#blueVariacionValue.positive {
    color: var(--success);
}

#blueVariacionValue.negative {
    color: var(--danger);
}

/* Estilos para la sección de actualización */
.update-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    margin-top: 1rem;
}

.update-time {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.btn-refresh {
    background-color: var(--accent-primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-refresh:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-refresh i {
    font-size: 0.9rem;
}

/* Animación para el icono de actualización */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.btn-refresh.loading i {
    animation: spin 1s linear infinite;
}

/* Estilos para la tabla de cotizaciones */
.cotizaciones-table {
    margin: 0;
}

.cotizaciones-table thead th {
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 500;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cotizaciones-table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cotizaciones-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Estilos para los valores */
.cotizaciones-table td:not(:first-child) {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.1rem;
}

/* Estilos para la variación */
#blueVariacionValue.positive {
    color: var(--success);
}

#blueVariacionValue.negative {
    color: var(--danger);
}

/* Estilos para el dropdown de búsqueda de clientes */
#clientSearchResults {
    background-color: #1A1F27 !important;
    border: 1px solid var(--accent-primary);
    border-radius: 0.5rem;
    padding: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    position: absolute;
    z-index: 1000;
    /* Debajo del modal (1050) */
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
}

/* Cada item en el dropdown */
#clientSearchResults>div {
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: white !important;
    background-color: #1A1F27 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2px;
    font-weight: 500;
    display: block;
    width: 100%;
}

/* Hover para los items */
#clientSearchResults>div:hover {
    background-color: var(--accent-primary) !important;
    color: white !important;
}

/* Contenedor del input */
.position-relative {
    position: relative;
    z-index: 9999;
}

/* Asegurar que el dropdown esté visible */
.d-none {
    display: none !important;
}

#clientSearchResults:not(.d-none) {
    display: block !important;
}

/* Estilos específicos para el dropdown de búsqueda de clientes */
#clientSearchResults.position-absolute {
    background-color: #1A1F27 !important;
    border: 1px solid var(--accent-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

#clientSearchResults div {
    padding: 0.75rem 1rem;
    background-color: #1A1F27 !important;
    color: white !important;
    transition: all 0.2s ease;
}

#clientSearchResults div:last-child {
    background: #1A1F27 !important;
    color: white !important;
    border-bottom: none;
}

#clientSearchResults div:hover {
    background-color: var(--accent-primary) !important;
    color: white !important;
}

/* Asegurar que el contenedor esté por encima */
.position-absolute.w-100.mt-1 {
    background-color: #1A1F27 !important;
    z-index: 9999;
}

/* Asegurar que el texto sea visible */
#clientSearchResults div * {
    color: white !important;
}

/* Estilos para estados de operaciones en el historial */
.operacion-pendiente {
    background-color: rgba(255, 193, 7, 0.15) !important;
}

.operacion-finalizada {
    background-color: rgba(40, 167, 69, 0.15) !important;
}

/* Badges para estados */
.badge-estado {
    padding: 0.4em 0.8em;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
}

.badge-pendiente {
    background-color: #ffc107;
    color: #000000;
    border: 1px solid #e0a800;
}

.badge-finalizado {
    background-color: #28a745;
    color: #ffffff;
    border: 1px solid #218838;
}

/* Hover effects */
tr.operacion-pendiente:hover {
    background-color: rgba(255, 193, 7, 0.25) !important;
}

tr.operacion-finalizada:hover {
    background-color: rgba(40, 167, 69, 0.25) !important;
}