/*
 * MitigaTheme — Variables de color y correcciones
 *
 * Para cambiar los colores del tema, modifica las variables CSS
 * en el bloque :root a continuación.
 */

/* ====================================================
   VARIABLES DE COLOR — personalizar aquí
   ==================================================== */
   :root {
    /* Sidebar */
    --mt-sidebar-bg:          #0424AA;
    --mt-sidebar-text:        #d0ddf7;
    --mt-sidebar-active-text: #ffffff;
    --mt-sidebar-hover-bg:    rgba(255, 255, 255, 0.06);
    --mt-sidebar-active-bg:   rgba(255, 255, 255, 0.10);

    /* Topbar */
    --mt-topbar-bg:           #ffffff;
    --mt-topbar-border:       #e5eaef;

    /* Fondo general */
    --mt-body-bg:             #f0f4ff;

    /* Color principal */
    --mt-primary:             #0424AA;
    --mt-primary-hover:       #0320a0;

    /* Color de acento de la instalación (cabecera de documentos, en pastel) */
    --mt-doc-accent:          #0424AA;
}

/* ====================================================
   SIDEBAR — aplicar variables
   ==================================================== */
.left-sidebar {
    background-color: var(--mt-sidebar-bg) !important;
}

.sidebar-nav .sidebar-item .sidebar-link {
    color: var(--mt-sidebar-text) !important;
}

.sidebar-nav .sidebar-item .sidebar-link i,
.sidebar-nav .sidebar-item .sidebar-link span {
    color: var(--mt-sidebar-text) !important;
}

.sidebar-nav .sidebar-item .sidebar-link:hover,
.sidebar-nav .sidebar-item .sidebar-link:focus {
    background-color: var(--mt-sidebar-hover-bg) !important;
    color: var(--mt-sidebar-active-text) !important;
}

.sidebar-nav .sidebar-item .sidebar-link:hover i,
.sidebar-nav .sidebar-item .sidebar-link:hover span,
.sidebar-nav .sidebar-item .sidebar-link:focus i,
.sidebar-nav .sidebar-item .sidebar-link:focus span {
    color: var(--mt-sidebar-active-text) !important;
}

.sidebar-nav .sidebar-item .sidebar-link.active {
    background-color: var(--mt-sidebar-active-bg) !important;
    color: var(--mt-sidebar-active-text) !important;
}

.sidebar-nav .sidebar-item .sidebar-link.active i,
.sidebar-nav .sidebar-item .sidebar-link.active span {
    color: var(--mt-sidebar-active-text) !important;
}

/* ====================================================
   CORRECCIÓN: Flechas del sidebar (mismo color que el texto)
   ==================================================== */
.sidebar-nav .has-arrow::after {
    border-color: var(--mt-sidebar-text) !important;
}

.sidebar-nav li.active > .has-arrow::after,
.sidebar-nav li > .has-arrow.active::after,
.sidebar-nav .has-arrow[aria-expanded=true]::after {
    border-color: var(--mt-sidebar-active-text) !important;
}

.sidebar-nav ul .sidebar-item .sidebar-link:hover.has-arrow::after,
.sidebar-nav ul .sidebar-item .sidebar-link:focus.has-arrow::after {
    border-color: var(--mt-sidebar-active-text) !important;
}

/* ====================================================
   CORRECCIÓN: Texto del menú no se corta
   ==================================================== */
.sidebar-nav .hide-menu {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    word-break: break-word;
    line-height: 1.35;
}

.sidebar-nav .sidebar-link {
    align-items: flex-start !important;
    height: auto !important;
    min-height: 45px;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

/* ====================================================
   ALTURA DEL SIDEBAR — controlada por variable
   ==================================================== */
:root {
    --mt-sidebar-offset: 120px; /* Altura del bloque del logo en el sidebar */
}

.sidebar-nav.scroll-sidebar {
    height: calc(100vh - var(--mt-sidebar-offset));
}

/* Columna del sidebar en flex: logo arriba, menú en medio (con su scroll) y lo que añadan los plugins
   (p. ej. el bloque «Soporte» de SoporteClientes) abajo, FUERA del menú. SoporteClientes lo pone con
   position:absolute sobre el menú y reserva 220px a ojo, así que el final del menú quedaba tapado. */
.left-sidebar > div {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.left-sidebar > div > .brand-logo {
    flex: 0 0 auto;
}

.left-sidebar > div > .sidebar-nav.scroll-sidebar {
    flex: 1 1 0;
    min-height: 0;
    height: auto !important;
}

/* El scroll del menú lo hace SimpleBar por dentro: el <nav> no debe tener el suyo (styles.min.css le pone
   overflow-y:auto). Con height:auto, .simplebar-wrapper heredaba «auto», crecía al alto del contenido y el
   nav sacaba una segunda barra nativa que subía el menú entero, barra de SimpleBar incluida.
   Ojo: «visible», no «hidden» — si el nav tiene overflow hidden, SimpleBar se apaga y el menú no baja. */
.left-sidebar > div > .sidebar-nav.scroll-sidebar[data-simplebar="init"] {
    overflow: visible !important;
}

.left-sidebar > div > .sidebar-nav.scroll-sidebar > .simplebar-wrapper {
    height: 100% !important;
}

.left-sidebar > div > :not(nav):not(.brand-logo) {
    position: static !important;
    flex: 0 0 auto;
}

/* ====================================================
   CORRECCIÓN: Scroll en el contenido principal
   ==================================================== */
html,
body {
    height: 100%;
    overflow: auto !important;
}

/* Ocultar <br> huérfanos dentro de page-wrapper que generan scroll extra */
#main-wrapper > br {
    display: none;
}

body {
    background-color: var(--mt-body-bg) !important;
}

.page-wrapper {
    height: 100vh;
    overflow: auto;
}

/* body-wrapper: flex column */
.body-wrapper {
    height: 100vh;
    display: flex !important;
    flex-direction: column !important;
    overflow: auto !important;
}

/* body-wrapper-inner: el único scroll container */
.body-wrapper-inner {
    flex: 1 1 auto !important;
    min-height: 0 !important; /* permite que flexbox limite el alto y active overflow */
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: auto !important; /* anula el calc(100vh - 60px) de flexy */
}

/* Padding solo cuando la barra de debug está activa */
.body-wrapper-inner.has-debugbar {
    padding-bottom: 44px;
}

/* ====================================================
   TOPBAR — sticky dentro del body-wrapper
   ==================================================== */
:root {
    --mt-topbar-height: 64px;
}

.app-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 200 !important;
    background-color: var(--mt-topbar-bg) !important;
    border-bottom: 1px solid var(--mt-topbar-border) !important;
}

/* ====================================================
   TABS STICKY — debajo del topbar
   ==================================================== */
ul.nav-tabs#mainTabs {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--mt-body-bg);
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 0;
}

/* ====================================================
   ANCHO DEL SIDEBAR — fijo 270px
   ==================================================== */
.left-sidebar {
    width: 270px !important;
}

@media (min-width: 1200px) {
    .body-wrapper {
        margin-left: 270px !important;
    }
}

/* ====================================================
   MINI SIDEBAR — toggle a modo compacto
   ==================================================== */
#main-wrapper[data-sidebartype="mini-sidebar"] .left-sidebar {
    width: 70px !important;
}

@media (min-width: 1200px) {
    #main-wrapper[data-sidebartype="mini-sidebar"] .body-wrapper {
        margin-left: 70px !important;
    }
}

#main-wrapper[data-sidebartype="mini-sidebar"] .hide-menu {
    display: none !important;
}

#main-wrapper[data-sidebartype="mini-sidebar"] .left-sidebar .has-arrow::after {
    display: none !important;
}

#main-wrapper[data-sidebartype="mini-sidebar"] .left-sidebar .sidebar-link {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

#main-wrapper[data-sidebartype="mini-sidebar"] .left-sidebar .sidebar-link .d-flex {
    justify-content: center !important;
    gap: 0 !important;
}

#main-wrapper[data-sidebartype="mini-sidebar"] .left-sidebar .brand-logo img {
    width: 36px !important;
    height: 36px !important;
}

/* Ocultar elementos añadidos por plugins externos en la base del sidebar */
#main-wrapper[data-sidebartype="mini-sidebar"] .left-sidebar > div > :not(nav):not(.brand-logo) {
    display: none !important;
}

/* ====================================================
   OVERLAY MÓVIL — fondo oscuro al abrir sidebar
   - display:none/block en lugar de solo opacity (fiable en iOS)
   - translateZ(0) fuerza capa GPU en iOS Safari
   ==================================================== */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

@media (max-width: 1199px) {
    .left-sidebar {
        z-index: 1001 !important;
    }
}

/* ====================================================
   TRANSICIONES SUAVES — sidebar y elementos
   ==================================================== */
.left-sidebar {
    transition: width 0.25s ease, transform 0.25s ease;
}

.body-wrapper {
    transition: margin-left 0.25s ease;
}

/* ====================================================
   ESTILOS DE IMPRESIÓN
   ==================================================== */
@media print {
    .left-sidebar,
    .app-header,
    .d-print-none {
        display: none !important;
    }

    .body-wrapper {
        margin-left: 0 !important;
        overflow: visible !important;
        height: auto !important;
        display: block !important;
    }

    .body-wrapper-inner {
        overflow: visible !important;
        height: auto !important;
    }

    .page-wrapper,
    html,
    body {
        overflow: visible !important;
        height: auto !important;
    }
}


/* Mini sidebar tooltips: gestionados por Bootstrap Tooltip (JS) con container:'body' */

/* ====================================================
   SKELETON LOADER — shimmer animation
   ==================================================== */
.mt-skeleton {
    position: relative;
    overflow: hidden;
    background: #e2e8f0;
    border-radius: 4px;
}

.mt-skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 150%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    animation: mt-shimmer 1.5s infinite;
}

@keyframes mt-shimmer {
    100% { left: 150%; }
}

.mt-skeleton-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--mt-body-bg, #f0f4ff);
    z-index: 50;
    padding: 24px;
}

.mt-skeleton-heading {
    height: 28px;
    width: 35%;
    margin-bottom: 20px;
    border-radius: 6px;
}

.mt-skeleton-row {
    display: flex;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.mt-skeleton-cell {
    height: 16px;
    flex: 1;
    border-radius: 4px;
}

/* Subtle fade-in on page load */
.body-wrapper-inner {
    animation: mt-fade-in 0.15s ease-out;
}

@keyframes mt-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ====================================================
   EMPTY STATE — styled CTA for empty list views
   ==================================================== */
.mt-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #6c757d;
}

.mt-empty-state i.fa-inbox {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.35;
    color: #adb5bd;
}

.mt-empty-state p {
    font-size: 1.05rem;
    margin-bottom: 16px;
}

/* ====================================================
   KEYBOARD SHORTCUTS — modal overlay
   ==================================================== */
.mt-shortcuts-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: mt-fade-in 0.15s ease-out;
}

.mt-shortcuts-modal {
    background: #fff;
    border-radius: 12px;
    padding: 24px 28px;
    max-width: 440px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

.mt-shortcut-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.mt-kbd {
    display: inline-block;
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 2px 8px;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.82rem;
    color: #495057;
}

/* ====================================================
   COMMAND PALETTE — Ctrl+K
   ==================================================== */
.mt-palette-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
    animation: mt-fade-in 0.1s ease-out;
}

.mt-palette-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 560px;
    width: 92%;
    box-shadow: 0 16px 48px rgba(0,0,0,0.22);
    overflow: hidden;
}

.mt-palette-input-wrap {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid #e5eaef;
}

.mt-palette-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
    color: #212529;
}

.mt-palette-input::placeholder {
    color: #adb5bd;
}

.mt-palette-results {
    max-height: 380px;
    overflow-y: auto;
    padding: 6px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.12) transparent;
}

.mt-palette-group {
    padding: 8px 18px 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
}

.mt-palette-item {
    display: flex;
    align-items: center;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 0.92rem;
    color: #212529;
    transition: background 0.08s;
}

.mt-palette-item:hover,
.mt-palette-item.selected {
    background: var(--mt-body-bg, #f0f4ff);
}

.mt-palette-item i:first-child {
    width: 20px;
    text-align: center;
    color: #6c757d;
    font-size: 0.85rem;
}

.mt-palette-empty {
    padding: 24px;
    text-align: center;
    color: #adb5bd;
    font-size: 0.92rem;
}

/* ====================================================
   SIDEBAR FAVORITES — star icon + pinned section
   ==================================================== */
.mt-fav-star {
    margin-left: auto;
    font-size: 0.7rem;
    opacity: 0;
    transition: opacity 0.15s ease, color 0.15s ease;
    color: #adb5bd;
    cursor: pointer;
    padding: 4px;
}

.sidebar-link:hover .mt-fav-star,
.mt-fav-star.active {
    opacity: 1;
}

.mt-fav-star.active {
    color: #ffc107;
}

.mt-fav-header {
    padding: 8px 20px 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--mt-sidebar-text, #d0ddf7);
    opacity: 0.7;
}

.mt-fav-list {
    list-style: none;
    padding: 0;
    margin: 0 0 8px;
}

#mt-favorites-section {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 4px;
    padding-bottom: 4px;
}

/* ====================================================
   DYNAMIC BREADCRUMBS
   ==================================================== */
.mt-breadcrumbs {
    padding: 0;
    margin-bottom: 4px;
    font-size: 0.82rem;
}

.mt-breadcrumbs .breadcrumb {
    background: transparent;
    padding: 0;
}

.mt-breadcrumbs .breadcrumb-item a {
    color: var(--mt-primary, #0424AA);
    text-decoration: none;
}

.mt-breadcrumbs .breadcrumb-item a:hover {
    text-decoration: underline;
}

.mt-breadcrumbs .breadcrumb-item.active {
    color: #6c757d;
}

.mt-breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
    content: '\203A';
    color: #adb5bd;
}

/* ====================================================
   STICKY ACTION BAR — fixed save/delete at bottom
   ==================================================== */
.mt-sticky-actions {
    position: fixed;
    bottom: 0;
    left: 270px;
    right: 0;
    background: #fff;
    border-top: 1px solid #e5eaef;
    padding: 10px 24px;
    display: none;
    align-items: center;
    gap: 8px;
    z-index: 200;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}

.mt-sticky-actions.visible {
    display: flex;
}

/* Cuando FS_DEBUG está activo y se renderiza la debugbar nativa, la sticky bar
   se levanta para no solaparse (la debugbar vive en bottom:0 right:0 z-index:10
   y la sticky antes la tapaba visualmente). */
body:has(.debugbar) .mt-sticky-actions {
    bottom: 36px;
}

/* Mini sidebar: adjust sticky bar left */
#main-wrapper[data-sidebartype="mini-sidebar"] .mt-sticky-actions {
    left: 70px;
}

@media (max-width: 1199px) {
    .mt-sticky-actions {
        left: 0;
    }
}

/* ====================================================
   CABECERA DE DOCUMENTOS — fondo pastel por instalación
   (pedidos, albaranes, facturas, asientos y demás fichas:
   ver bloque bodyHeaderOptions en PanelControllerTop.html.twig)
   ==================================================== */
.mt-doc-header {
    background-color: color-mix(in srgb, var(--mt-doc-accent, #0424AA) 15%, white);
    border-bottom: 1px solid color-mix(in srgb, var(--mt-doc-accent, #0424AA) 30%, white);
}

/* ====================================================
   CUSTOM SCROLLBAR — thin, themed
   ==================================================== */
.mt-custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.mt-custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.mt-custom-scrollbar::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--mt-primary, #0424AA) 25%, transparent);
    border-radius: 3px;
}

.mt-custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--mt-primary, #0424AA) 50%, transparent);
}

/* Firefox */
.mt-custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--mt-primary, #0424AA) 25%, transparent) transparent;
}



/* ====================================================
   CABECERA DE COMPRAS Y VENTAS — holgada y plegable (v3.5)
   Principales siempre a la vista; el resto en un acordeón
   que plegado enseña el resumen de sus valores.
   JS en Assets/JS/cabecera-doc.js
   ==================================================== */
.row.mt-cab {
    display: block;
    margin: 0;
}

.row.mt-cab > .mt-cab-principal,
.row.mt-cab > .mt-cab-barra,
.row.mt-cab > .mt-cab-resto {
    width: auto;
    padding: 0;
    margin-top: 0;
}

.mt-cab-principal {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    column-gap: .75rem;
}

.mt-cab-principal > .mt-cab-campo,
.mt-cab-resto > .mt-cab-campo {
    width: auto;
    max-width: none;
    min-width: 0;
    padding: 0;
    margin: 0;
}

/* con tope de anchura: si la fila se parte, el que queda solo no se estira a todo lo ancho */
.mt-cab-principal > .mt-cab-campo { flex: 1 1 120px; max-width: 18rem; }
.mt-cab-principal > .mt-cab-ancho { flex: 2 1 200px; max-width: 34rem; }
/* la fecha, con el ancho justo para dd/mm/aaaa y el calendario (v3.7, para que quepa la serie) */
.mt-cab-principal > .mt-cab-fecha { flex: 0 0 9.5rem; }
.mt-cab-principal > .mt-cab-suelto { flex: 0 0 auto; align-self: flex-end; }
.mt-cab-principal > .mt-cab-total { flex: 0 0 170px; order: 100; margin-left: auto; }

.mt-cab-resto {
    display: none;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    column-gap: 1rem;
}

.mt-cab-abierta > .mt-cab-resto { display: grid; }

/* etiquetas en una sola línea, más discretas que el valor */
.mt-cab .mt-cab-etq {
    display: block;
    margin-bottom: .2rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: .8rem;
    font-weight: 600;
    color: #5f6b7a;
}

.mt-cab .mt-cab-etq a:not(.small) { color: inherit; text-decoration: underline dotted; text-underline-offset: 2px; }
.mt-cab .mt-cab-etq a:hover { color: var(--mt-primary, #0424AA); }

/* la barra del acordeón: botón + resumen de lo plegado en una línea */
.mt-cab-barra {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
    margin: 0 0 .5rem;
    padding: .35rem .5rem;
    border-radius: .375rem;
    background: color-mix(in srgb, var(--mt-doc-accent, #0424AA) 6%, white);
    border: 1px solid color-mix(in srgb, var(--mt-doc-accent, #0424AA) 18%, white);
    cursor: pointer;
}

.mt-cab-barra:hover { background: color-mix(in srgb, var(--mt-doc-accent, #0424AA) 11%, white); }

.mt-cab-plegar {
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    background: none;
    font-size: .85rem;
    font-weight: 600;
    color: color-mix(in srgb, var(--mt-doc-accent, #0424AA) 80%, black);
}

.mt-cab-plegar i { transition: transform .15s ease; }
.mt-cab-abierta .mt-cab-plegar i { transform: rotate(90deg); }

.mt-cab-resumen {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: .85rem;
    color: #343a40;
}

.mt-cab-abierta .mt-cab-resumen { visibility: hidden; }
.mt-cab-dato + .mt-cab-dato::before { content: "·"; margin: 0 .55rem; color: #adb5bd; }
.mt-cab-dato-etq { color: #7a8594; }

/* ====================================================
   FICHAS — botones en una fila con menú «Más» y, a la
   derecha, tipo, número y cliente/proveedor (v3.6)
   JS en Assets/JS/barra-acciones.js
   ==================================================== */
.mt-doc-izq { min-width: 0; }

.mt-barra-acciones {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .3rem;
    margin-top: .35rem;
}

.mt-barra-acciones .me-3 { margin-right: 0 !important; }

.mt-mas-menu { min-width: 15rem; padding: .35rem 0; }

/* los botones que pasan al menú se ven como opciones de menú */
.mt-mas-menu > .btn {
    display: flex;
    align-items: center;
    gap: .35rem;
    width: 100%;
    padding: .4rem 1rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--bs-body-color, #212529);
    font-size: .875rem;
    text-align: left;
    white-space: nowrap;
}

.mt-mas-menu > .btn:hover,
.mt-mas-menu > .btn:focus-visible { background: var(--bs-tertiary-bg, #f1f3f5); color: var(--bs-body-color, #212529); }
.mt-mas-menu > .btn > span.d-none { display: inline !important; }
.mt-mas-menu > .btn > i { color: var(--mt-primary, #0424AA); }
.mt-mas-menu > .btn-success > i { color: #198754; }
.mt-mas-menu > [class*="btn-warning"] > i, .mt-mas-menu > [class*="btn-outline-warning"] > i { color: #c98a00; }
.mt-mas-menu > [class*="btn-danger"] > i { color: #dc3545; }

/* tipo, número y nombre del cliente o proveedor */
.mt-doc-ident {
    align-items: flex-start;
    max-width: min(21rem, 34%);
    min-width: 0;
}

.mt-doc-ident-textos { min-width: 0; overflow: hidden; }
.mt-doc-ident-textos .text-info { line-height: 1.35; }

.mt-doc-sujeto {
    display: block;
    margin-top: .15rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: .95rem;
    font-weight: 600;
    color: var(--bs-body-color, #212529);
    text-decoration: none;
}

.mt-doc-sujeto:hover { color: var(--mt-primary, #0424AA); text-decoration: underline; }

/* ====================================================
   AVISO DE ANTICIPOS — barra fina de una línea (v3.6)
   (separado del resto de avisos en MenuTemplate)
   ==================================================== */
.alert.mt-aviso-fino {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin-top: .5rem;
    margin-bottom: .5rem;
    padding: .3rem 2.5rem .3rem .75rem;
    font-size: .85rem;
    line-height: 1.35;
}

.alert.mt-aviso-fino .btn-close { padding: .55rem .8rem; font-size: .65rem; }
