@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');
@import url('bootstrap/bootstrap-icons-1.13.1/bootstrap-icons.min.css');
@import url('fontawesome-free-7.0.1-web/css/all.min.css');

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.875rem;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    flex: 1;
    padding-top: 1.1rem;
    position: relative;
    z-index: 0;
    overflow-y: auto;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUg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My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

select.form-select-sm {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2rem; /* espacio para la flecha */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

.rz-primary-sm {
    background-color: #0d6efd !important; /* Azul Bootstrap */
    border-color: #0d6efd !important;
    color: #fff !important;
    line-height: 1.2 !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 0.2rem !important;
    height: auto !important;
    /*min-height: unset !important;*/
    min-height: 30px !important;
    font-size: 0.875rem !important;
}

.sidebar-color-n {
    /*background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%) !important;*/
    background-image: linear-gradient(180deg, rgb(172, 41, 37) 0%, #4D0415 70%) !important;
    /*background-image: linear-gradient( 180deg, #001f3f 0%, #0074D9 100% ) !important;*/
    /*background-image: linear-gradient( 180deg, #051937 0%, #1e3a8a 60%, #3b82f6 100%) !important;*/
    /*background-image: linear-gradient( 180deg, #0a192f 0%, #112d4e 50%, #3f72af 100%) !important;*/
    /*background-image: linear-gradient( 180deg, #0a2472 0%, rgb(5, 0, -1) 70% ) !important;*/
}

.bi-node-plus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-node-plus' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M11 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8M6.025 7.5a5 5 0 1 1 0 1H4A1.5 1.5 0 0 1 2.5 10h-1A1.5 1.5 0 0 1 0 8.5v-1A1.5 1.5 0 0 1 1.5 6h1A1.5 1.5 0 0 1 4 7.5zM11 5a.5.5 0 0 1 .5.5v2h2a.5.5 0 0 1 0 1h-2v2a.5.5 0 0 1-1 0v-2h-2a.5.5 0 0 1 0-1h2v-2A.5.5 0 0 1 11 5M1.5 7a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h1a.5.5 0 0 0 .5-.5v-1a.5.5 0 0 0-.5-.5z'/%3E%3C/svg%3E");
}

.bi-node-plus-fill {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-node-plus' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M11 13a5 5 0 1 0-4.975-5.5H4A1.5 1.5 0 0 0 2.5 6h-1A1.5 1.5 0 0 0 0 7.5v1A1.5 1.5 0 0 0 1.5 10h1A1.5 1.5 0 0 0 4 8.5h2.025A5 5 0 0 0 11 13m.5-7.5v2h2a.5.5 0 0 1 0 1h-2v2a.5.5 0 0 1-1 0v-2h-2a.5.5 0 0 1 0-1h2v-2a.5.5 0 0 1 1 0'/%3E%3C/svg%3E");
}

.bi-plus-circle-fill {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-plus-circle-fill' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0M8.5 4.5a.5.5 0 0 0-1 0v3h-3a.5.5 0 0 0 0 1h3v3a.5.5 0 0 0 1 0v-3h3a.5.5 0 0 0 0-1h-3z'/%3E%3C/svg%3E");
}

.bi-node-plus:before {
    position: relative;
    top: 1px;
    display: inline-block;
    speak: none;
    font-family: Icons;
    font-style: normal;
    font-weight: 400;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.inline-flx {
    display: inline;
    white-space: nowrap;
}

.container-general {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    /*border-radius: 6px;*/
    background-color: #fff;
}

    .container-general h3 {
        font-weight: bold;
        font-size: 18px;
        color: #333333;
        text-transform: uppercase;
       /* border-bottom: 1px solid #E5E5E5;*/
        padding: 8px 0px;
    }

    .container-general h4 {
        font-weight: bold;
        font-size: 16px;
        color: #333333;
        text-transform: uppercase;
        /* border-bottom: 1px solid #E5E5E5;*/
        padding: 8px 0px;
    }

    .container-general h5 {
        font-weight: bold;
        font-size: 0.875rem;
        color: #333333;
        text-transform: uppercase;
        /* border-bottom: 1px solid #E5E5E5;*/
        padding: 8px 0px;
    }

.tituloTarjeta {
    font-weight: bold;
    font-size: 18px;
    color: #333333;
    text-transform: uppercase;
}

.module-toolbar {
    border-bottom: 2px solid #e0e0e0;
    /*padding: 0.5rem 0;*/
}

/*.rz-overlaypanel {
    max-height: 300px !important;
    overflow: hidden !important;
}

.rz-overlaypanel-content {
    max-height: 300px !important;
    overflow: auto;
}*/
/*
.rz-overlaypanel {
    max-height: calc(100vh - 350px) !important;
    max-width: calc(100vw - 350px) !important;
    overflow: hidden !important;
}

.rz-overlaypanel-content {
    max-height: calc(100vh - 350px) !important;
    overflow-y: auto !important;
}*/

.rz-overlaypanel.rz-grid-date-filter.rz-open {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 550px;
    max-height: 80vh;
    overflow: auto;
}

.rz-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    background-color: var(--rz-background-color);
    border-bottom: 1px solid var(--rz-border-color);
    transition: background-color 0.2s ease;
}

/* Botones del toolbar */
.rz-toolbar-button,
.rz-toolbar-button .rz-button,
.rz-toolbar-splitbutton .rz-button {
    background-color: transparent !important;
    color: var(--rz-text-color) !important;
    border-radius: 6px !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    border-radius: 0 !important;
}

    .rz-toolbar-button .rz-button-icon,
    .rz-toolbar-splitbutton .rz-button-icon {
        font-size: 18px;
        color: inherit !important;
    }

    .rz-toolbar-button:hover,
    .rz-toolbar-button .rz-button:hover,
    .rz-toolbar-splitbutton .rz-button:hover {
        background: linear-gradient(90deg, rgb(172, 41, 37) 0%, #e7113f 120%) !important; /* rojo degradado */
        background-color: var(--rz-primary-light) !important;
        border-color: var(--rz-primary) !important;
        color: #fff !important;
        border-radius: 0 !important;
    }

.rz-toolbar-splitbutton {
    background-color: transparent !important;
    box-shadow: none !important;
}

.rz-shadow-1 {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}


.rz-button.custom-red {
    background-color: transparent !important;
    color: var(--rz-text-color) !important;
    border-radius: 6px !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    border-radius: 0 !important;
}

    .rz-button.custom-red:hover {
        background: linear-gradient(90deg, rgb(172, 41, 37) 0%, #e7113f 120%) !important; /* rojo degradado */
        background-color: var(--rz-primary-light) !important;
        border-color: var(--rz-primary) !important;
        color: #fff !important;
        border-radius: 0 !important;
    }

/*.rz-steps-item .rz-steps-title {
    color: black;
}

.rz-steps-item.rz-steps-current .rz-steps-title {
    color: red;
}*/

/*.rz-steps-title::after {
    content: " *";
    color: red;
}
*/
.rz-steps-item:nth-child(1) .rz-steps-title::after {
    content: " *";
    color: red;
}

.rz-steps-item:nth-child(2) .rz-steps-title::after {
    content: " *";
    color: red;
}

.rz-steps-item:nth-child(4) .rz-steps-title::after {
    content: " *";
    color: red;
}

.rz-steps-item:nth-child(6) .rz-steps-title::after {
    content: " *";
    color: red;
}

.rz-steps-item .rz-steps-number {
    background-color: gray;
    color: white;
}

.rz-steps-item.rz-steps-current .rz-steps-number {
    background-color: red;
}

.grid-personalizado .rz-grid-table {
    background-color: #ffffff !important;
    border: none !important;
}

    .grid-personalizado .rz-grid-table tbody tr {
        cursor: pointer;
    }

    .grid-personalizado .rz-grid-table thead th     
    {
        background: linear-gradient(180deg, #f4f4f4 0%, #e2e2e2 100%) !important;
        color: #ffffff !important;
        border: none !important;
        border-color: transparent !important;
        font-weight: bold !important;
    }

    .grid-personalizado .rz-grid-table tbody tr td {
        background-color: #ffffff !important;
        color: #333 !important;
        border: none !important;
        border-color: transparent !important;
        border-bottom: 1px solid #f0f0f0 !important;
    }

    .grid-personalizado .rz-grid-table .rz-state-highlight td {
        background-color: #ffe5e5 !important;       
        transition: background-color 0.2s ease;
    }

    .grid-personalizado .rz-grid-table .rz-state-highlight td,
    .grid-personalizado .rz-grid-table .rz-state-highlight .rz-cell-data {
        color: #6990f5 !important;
    }

    .grid-personalizado .rz-grid-table tbody tr:hover td {
        background-color: #ffe5e5 !important;     
        transition: background-color 0.2s ease;
    }

    .grid-personalizado .rz-grid-table tbody tr.rz-state-highlight > td {
        background-color: #ffb3b3 !important;
    }

.grid-personalizado .rz-button.edit-button {
    background-color: #e6f4ea !important;
    color: #0b6b34 !important;
    border: 1px solid #b9e1c3 !important;
    transition: all 0.2s ease-in-out;
    border-radius: 4px;
    margin-right: 5px;
}

    .grid-personalizado .rz-button.edit-button:hover {
        background-color: #c7e8d0 !important;
        color: #064a24 !important;
    }

.grid-personalizado .rz-button.delete-button {
    background-color: #fbeaea !important;
    color: #b30e0e !important;
    border: 1px solid #f1b8b8 !important;
    transition: all 0.2s ease-in-out;
    border-radius: 4px;
    margin-right: 5px;
}

    .grid-personalizado .rz-button.delete-button:hover {
        background-color: #f5c8c8 !important;
        color: #7a0808 !important;
    }

.grid-personalizado .rz-button.search-button {
    background-color: #e6f0ff !important; /* azul muy suave */
    color: #0b4f9c !important; /* azul medio */
    border: 1px solid #aacaef !important; /* borde azul claro */
    transition: all 0.2s ease-in-out;
    border-radius: 4px;
    margin-right: 5px;
}

    .grid-personalizado .rz-button.search-button:hover {
        background-color: #c8defc !important; /* azul más intenso al pasar */
        color: #073b75 !important; /* azul más profundo */
    }

.grid-personalizado .rz-button.history-button {
    background-color: #eddffb !important;
    color: #831fe0 !important;
    border: 1px solid #c495f0 !important;
    transition: all 0.2s ease-in-out;
    border-radius: 4px;
    margin-right: 5px;
}

    .grid-personalizado .rz-button.history-button:hover {
        background-color: #d0aaf3 !important;
        color: #6918b4 !important;
    }

.grid-personalizado .rz-button.print-button {
    background-color: #f2f2f2 !important;
    color: #6b6b6b !important;
    border: 1px solid #aacaef !important;
    transition: all 0.2s ease-in-out;
    border-radius: 4px;
    margin-right: 5px;
}

    .grid-personalizado .rz-button.print-button:hover {
        background-color: #d9d9d9 !important;
        color: #4d4d4d !important;
    }

/* Ajuste general para evitar overflow en cualquier notificación */
.rz-notification-item-wrapper {
    max-width: 600px !important;
    width: auto !important;
    white-space: normal !important;
    word-break: break-word !important;
    margin-top: -5px;
}

    .rz-notification-item-wrapper.rz-open.rz-notification-error {
        max-width: 600px !important;
        width: auto !important;
        border-left: 5px solid #d32f2f !important;
        background: #fdecea !important;
        color: #b71c1c !important;
        white-space: normal !important;
        word-break: break-word !important;
    }

.rz-notification .rz-notification-content {
    word-break: break-word !important;
    white-space: normal !important;
}

.rz-toggle-button[style*="success"],
.rz-toggle-button.success-fix {
    background-color: var(--rz-success) !important;
    color: var(--rz-on-success) !important;
}

.embarque-detalleresumen-linea {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    white-space: nowrap;
}

.embarque-detalleresumen-cuenta {
    font-size: 0.875rem;
    font-weight: 700;
}

.embarque-detalleresumen-tipo {
    font-size: 0.875rem;
    color: #666;
}

.embarque-detalleresumen-total {
    font-size: 0.875rem;
    color: #666;
    font-weight: 700;
}

.embarque-detalleresumen-sep {
    color: #999;
}

.accordion-close-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px; /* espacio horizontal */
}

    .accordion-close-wrapper .rz-button {
        margin: 0;
        min-width: 32px;
        height: 32px;
    }

.icono-con-badge {
    position: relative;
    display: inline-block;
}

.icono-factura {
    max-width: 65px;
    height: auto;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

    .icono-factura:hover {
        transform: scale(1.05);
        opacity: 0.9;
    }

.icono-btn-borrar {
    position: absolute;
    top: -8px;
    left: -8px;
    width: 18px;
    height: 18px;
    background-color: #dc3545;
    color: white;
    font-size: 12px;
    font-weight: bold;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
}

.icono-hover:hover .icono-btn-borrar  {
    display: flex;
}

@media (max-width: 640.98px) {
    body .rz-dialog-wrapper {
        top: 100px !important; /* aumenta el margen para header más alto */
        width: 95% !important; /* opcional: reduce el ancho para pantallas pequeñas */
        left: 2.5% !important; /* centra el diálogo */
        transform: none !important; /* evita recortes */
    }

    body .rz-dialog {
        max-height: calc(100vh - 120px) !important; /* evita que se corte */
        overflow-y: auto !important;
    }
}

.column-multiline {
    white-space: pre-line !important;
}

.grid-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.rz-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.35);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}
