/* ============================================================
   Portal Proveedores – Overrides de estética (sobre Material Dashboard)
   Basado en mockup de rediseño v2
   ============================================================ */

/* ── TIPOGRAFÍA GLOBAL ──────────────────────────────────────── */
body,
.navbar,
.card,
.table,
input, select, textarea, button {
    font-family: 'Barlow', sans-serif !important;
}

/* Títulos y valores grandes con Barlow Condensed */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.topbar-title,
.kpi-value,
.font-weight-bolder {
    font-family: 'Barlow Condensed', sans-serif !important;
}

/* ── VARIABLES ─────────────────────────────────────────────── */
:root {
    --p-red:        #F32735;   /* Pantone 1788 C — rojo corporativo Tuteur */
    --p-red-dark:   #F32735;   /* versión oscura del rojo corporativo */
    --p-green:      #27AE60;
    --p-orange:     #F39C12;
    --p-blue:       #69A9E3;   /* Pantone 284 C — celeste complementario Tuteur */
    --p-blue-dark:  #003057;   /* Pantone 295 C — azul navy complementario Tuteur */
    --p-gray-900:   #1E1E1E;
    --p-gray-700:   #3D3D3D;
    --p-gray-600:   #555555;
    --p-gray-400:   #999999;
    --p-gray-200:   #E8E8E8;
    --p-gray-100:   #F4F4F4;
    --p-gray-50:    #FAFAFA;
    --p-sidebar-w:  240px;
}

/* ── SWEETALERT ─────────────────────────────────────────────── */
.swal-btn-tuteur,
.swal-btn-tuteur:hover,
.swal-btn-tuteur:focus,
.swal-btn-tuteur:active {
    background-color: var(--p-blue-dark) !important;
    border: none !important;
    color: #fff !important;
    border-radius: 0.25rem !important;
    padding: 0.625em 2em !important;
    font-size: 1em !important;
    font-family: 'Barlow', sans-serif !important;
}

/* ── BODY / FONDO ───────────────────────────────────────────── */
body.g-sidenav-show {
    background-color: var(--p-gray-100) !important;
}

/* ── SIDEBAR: full-height, sin márgenes, sin border-radius ─── */
.sidenav {
    border-radius: 0 !important;
    margin: 0 !important;
    top: 0 !important;
    height: 100vh !important;
    width: var(--p-sidebar-w) !important;
    background: var(--p-gray-900) !important;
    background-image: none !important;
    display: flex !important;
    flex-direction: column !important;
}
.sidenav .collapse.navbar-collapse,
.sidenav .collapsing.navbar-collapse,
#sidenav-collapse-main {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    /* Ocultar scrollbar visual manteniendo funcionalidad */
    scrollbar-width: none !important;        /* Firefox */
    -ms-overflow-style: none !important;     /* IE/Edge */
}
#sidenav-collapse-main::-webkit-scrollbar {
    display: none;                           /* Chrome/Safari */
}

/* En mobile: bloquear scroll del body cuando el sidebar está abierto */
@media (max-width: 1199px) {
    body.g-sidenav-pinned,
    body.g-sidenav-show.g-sidenav-pinned {
        overflow: hidden !important;
        height: 100vh !important;
    }
}

/* El main-content compensa el ancho real del sidebar */
@media (min-width: 1200px) {
    .sidenav.fixed-start + .main-content {
        margin-left: var(--p-sidebar-w) !important;
    }
}

/* ── SIDEBAR – header / logo ────────────────────────────────── */
.sidenav .sidenav-header {
    height: auto !important;
    padding: 16px 20px 0 20px !important;
}
.sidebar-portal-label {
    font-size: 9px;
    font-weight: 600;
    color: rgba(255,255,255,.3);
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 6px 0 16px 0;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

/* ── SIDEBAR – bloque usuario ────────────────────────────────── */
.sidenav .sidebar-user-block {
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255,255,255,.07);
}
.sidenav .sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidenav .sidebar-user-cuit {
    font-size: 11px;
    color: rgba(255,255,255,.35);
    margin-top: 2px;
}

/* ── SIDEBAR – section labels ────────────────────────────────── */
.sidenav h6.nav-section-label,
.sidenav .navbar-nav > li > h6 {
    padding: 6px 20px 2px !important;
    font-size: 9px !important;
    font-weight: 700 !important;
    color: rgba(255,255,255,.2) !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    margin: 0 !important;
}

/* ── SIDEBAR – nav items generales ──────────────────────────── */
.sidenav .navbar-nav .nav-link {
    color: rgba(255,255,255,.5) !important;
    border-left: 3px solid transparent !important;
    border-radius: 0 !important;
    padding: 6px 20px !important;
    margin: 0 !important;
    transition: background .15s, color .15s !important;
    box-shadow: none !important;
}
.sidenav .navbar-nav .nav-link:hover {
    background: rgba(255,255,255,.05) !important;
    color: rgba(255,255,255,.8) !important;
}

/* ── SIDEBAR – item ACTIVO: borde rojo izquierdo ─────────────── */
.sidenav .navbar-nav .nav-link.active,
.sidenav .navbar-nav > .nav-item.active .nav-link,
.sidenav .navbar-nav > .nav-item .nav-link.active {
    background: rgba(255,255,255,.25) !important;
    border-left-color: var(--p-red) !important;
    color: #ffffff !important;
    box-shadow: none !important;
    font-weight: 500 !important;
}

/* Sub-items (collapse) */
.sidenav .navbar-nav .nav-item .collapse .nav-link,
.sidenav .navbar-nav .nav-item .collapsing .nav-link {
    padding-left: 44px !important;
    font-size: 12px !important;
    color: rgba(255,255,255,.45) !important;
    border-left: 3px solid transparent !important;
}
.sidenav .navbar-nav .nav-item .collapse .nav-link.active,
.sidenav .navbar-nav .nav-item .collapse .nav-link:hover {
    color: rgba(255,255,255,.85) !important;
    background: rgba(255,255,255,.05) !important;
}

/* ── SIDEBAR – iconos ────────────────────────────────────────── */
.sidenav .navbar-nav .nav-link .material-icons-round {
    font-size: 18px !important;
    opacity: .7;
}
.sidenav .navbar-nav .nav-link.active .material-icons-round {
    opacity: 1;
}

/* ── SIDEBAR – footer (logout) ───────────────────────────────── */
.sidenav .sidenav-footer {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: 8px 20px 12px !important;
    background: transparent !important;
    border-top: 1px solid rgba(255,255,255,.07) !important;
}
.sidenav .sidenav-footer a.nav-link {
    color: rgba(255,255,255,.5) !important;
    opacity: 1 !important;
    font-size: 12px !important;
    padding: 6px 8px !important;
    border-radius: 4px !important;
    border-left: none !important;
    transition: color .2s, background .2s !important;
}
.sidenav .sidenav-footer a.nav-link:hover {
    color: rgba(255,255,255,.85) !important;
    background: rgba(255,255,255,.05) !important;
}

/* ── MAIN CONTENT ───────────────────────────────────────────── */
.main-content {
    background-color: var(--p-gray-100) !important;
    border-radius: 0 !important;
}

/* ── TOP NAVBAR ─────────────────────────────────────────────── */
.navbar-main {
    background: #ffffff !important;
    border-bottom: 1px solid var(--p-gray-200) !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 2rem !important;
    min-height: 64px !important;
    top: 0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
}
.navbar-main .container-fluid {
    min-height: 64px !important;
    padding: 0 !important;
}
/* Badge notificaciones sidebar */
.sidebar-notif-badge {
    background: var(--p-red);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 99px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Botón notificaciones */
.navbar-notif-btn {
    position: relative;
    width: 36px;
    height: 36px;
    background: #f4f4f4;
    transition: background .2s;
    text-decoration: none;
    flex-shrink: 0;
}
.navbar-notif-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--p-red);
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

/* Título de la página */
.navbar-main h6.font-weight-bolder {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--p-gray-900) !important;
    letter-spacing: .3px !important;
}
/* Breadcrumb reducido */
.navbar-main .breadcrumb {
    margin-bottom: 0 !important;
}
.navbar-main .breadcrumb-item a,
.navbar-main .breadcrumb-item.active {
    font-size: 11px !important;
    color: var(--p-gray-400) !important;
}
/* Iconos del navbar */
.navbar-main .material-icons {
    color: var(--p-gray-600) !important;
}
.navbar-main .nav-link:hover .material-icons {
    color: var(--p-red) !important;
}

/* ── CARDS: planas, sin sombra, borde sutil ─────────────────── */
.card {
    box-shadow: none !important;
    border: 1px solid var(--p-gray-200) !important;
    border-radius: 6px !important;
}
.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.06) !important;
}
.card.data-tables,
.card.data-tables:hover {
    box-shadow: none !important;
    border-radius: 6px !important;
}

/* ── KPI CARDS (franja de color inferior) ──────────────────── */
.kpi-card {
    position: relative;
    overflow: hidden;
}
.kpi-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
}
.kpi-card.kpi-red::after    { background: var(--p-red); }
.kpi-card.kpi-green::after  { background: var(--p-green); }
.kpi-card.kpi-orange::after { background: var(--p-orange); }
.kpi-card.kpi-blue::after   { background: var(--p-blue); }

/* ── HEADER DE PERFIL (banner con avatar) ───────────────────── */
.page-header.borde_Tuteur {
    border-radius: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
.card.card-body.mx-3.mx-md-4 {
    border-radius: 6px !important;
    box-shadow: none !important;
    border: 1px solid var(--p-gray-200) !important;
}

/* nav-pills genérico — solo para casos fuera de portal-tab-nav */
.nav-pills .nav-link {
    font-size: 13px !important;
    transition: all .15s ease !important;
}

/* ── TABLAS ─────────────────────────────────────────────────── */
.table thead th,
.data-table th,
.mini-table th {
    background-color: var(--p-gray-50) !important;
    border-bottom: 2px solid var(--p-gray-200) !important;
    color: var(--p-gray-600) !important;
    font-weight: 700 !important;
    font-size: 10px !important;
    text-transform: uppercase !important;
    letter-spacing: .8px !important;
    padding: 10px 16px !important;
}
.table tbody td {
    font-size: 13px !important;
    color: var(--p-gray-700) !important;
    border-bottom: 1px solid var(--p-gray-100) !important;
    vertical-align: middle !important;
    padding: 11px 16px !important;
}
.table tbody tr:hover td {
    background-color: var(--p-gray-50) !important;
}
/* Quitar box-shadow de celdas que agrega Bootstrap 5 en algunas variantes */
.table > :not(caption) > * > * {
    box-shadow: none !important;
}

/* ── BADGES ─────────────────────────────────────────────────── */
.badge-tuteur {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.badge-tuteur::before {
    content: '';
    width: 5px; height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}
.badge-tuteur.badge-green  { background: #E8F8EF; color: #1A7A45; }
.badge-tuteur.badge-green::before { background: var(--p-green); }
.badge-tuteur.badge-red    { background: #FFF0EF; color: var(--p-red); }
.badge-tuteur.badge-red::before { background: var(--p-red); }
.badge-tuteur.badge-orange { background: #FFF7E6; color: #9A6500; }
.badge-tuteur.badge-orange::before { background: var(--p-orange); }
.badge-tuteur.badge-blue   { background: #EBF5FB; color: #1F618D; }
.badge-tuteur.badge-blue::before { background: var(--p-blue); }
.badge-tuteur.badge-gray   { background: var(--p-gray-100); color: var(--p-gray-600); }
.badge-tuteur.badge-gray::before { background: var(--p-gray-400); }

/* ── FILTER BAR ─────────────────────────────────────────────── */
.filter-bar-portal {
    background: white;
    border: 1px solid var(--p-gray-200);
    border-radius: 6px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

/* ── BOTONES ─────────────────────────────────────────────────── */
.btn-primary,
.btn.bg-gradient-primary {
    background: var(--p-red) !important;
    background-image: none !important;
    border-color: var(--p-red) !important;
    box-shadow: none !important;
}
.btn-primary:hover,
.btn.bg-gradient-primary:hover {
    background: var(--p-red) !important;
    border-color: var(--p-red) !important;
    box-shadow: none !important;
}

/* ── PAGINACIÓN ──────────────────────────────────────────────── */
.portal-pagination {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}
.pagination { margin: 0; gap: 3px; }
.pagination .page-link {
    border: 1.5px solid var(--p-gray-200) !important;
    border-radius: 4px !important;
    color: var(--p-gray-700) !important;
    font-size: 12px !important;
    padding: 5px 11px !important;
    transition: all .15s !important;
}
.pagination .page-link:hover {
    border-color: var(--p-red) !important;
    color: var(--p-red) !important;
    background: #fff0ef !important;
}
.pagination .page-item.active .page-link {
    background: var(--p-red) !important;
    border-color: var(--p-red) !important;
    color: white !important;
}
.pagination .page-item.disabled .page-link {
    color: var(--p-gray-400) !important;
    background: var(--p-gray-50) !important;
}

/* ── SCROLLBAR ────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--p-gray-200); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--p-gray-400); }

/* ── MOVING TAB (inyectado por material-dashboard.js) ─────────── */
.moving-tab { display: none !important; }

/* ── SECTION HEADER BANNER ────────────────────────────────────── */
.section-header-banner {
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    padding: 28px 32px 0 32px;
    position: relative;
    overflow: hidden;
}
/* Capa 1: overlay oscuro + degradé rojo hacia la derecha */
.section-header-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, rgba(0,0,0,.55) 0%, rgba(91,102,112,.65) 100%);
    border-radius: 8px;
    z-index: 0;
}

/* Círculos decorativos — ocultos por manual de marca */
.shb-circle { display: none; }

/* Título + subtítulo */
.shb-content { position: relative; z-index: 1; margin-bottom: 20px; }
.shb-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 28px; font-weight: 700;
    color: white; line-height: 1.1;
    letter-spacing: .2px;
}
.shb-sub {
    font-size: 13px;
    color: rgba(255,255,255,.5);
    margin-top: 3px;
}

/* Tabs pegados al fondo del banner */
.shb-tabs {
    display: flex;
    gap: 2px;
    position: relative; z-index: 1;
    border-top: 1px solid rgba(255,255,255,.1);
    margin-top: 8px;
    padding-top: 4px;
    padding-bottom: 4px;
}
.shb-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px 12px;
    font-size: 13px; font-weight: 600;
    color: #ffffff;
    text-decoration: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    border-radius: 4px 4px 0 0;
    transition: color .15s, background .15s;
    white-space: nowrap;
    position: relative;
}
.shb-tab .material-icons { font-size: 16px; }
.shb-tab span {
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-variant: normal !important;
    font-variant-caps: normal !important;
}
.shb-tab:hover:not(.is-active) {
    color: #ffffff;
    background: rgba(255,255,255,.1);
}
.shb-tab.is-active {
    color: white;
    font-weight: 600;
    background: rgba(255,255,255,.1);
}
/* Línea roja debajo del tab activo */
.shb-tab.is-active::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--p-red);
    border-radius: 2px 2px 0 0;
}

/* ── TABLE CARD (reemplaza el card genérico de Material Dashboard) */
.portal-table-card {
    background: white;
    border: 1px solid var(--p-gray-200);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
}
.portal-table-card-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--p-gray-200);
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.portal-table-card-header > span {
    font-size: 13px;
    font-weight: 600;
    color: var(--p-gray-600);
    letter-spacing: .2px;
}
.portal-table-card-title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 16px; font-weight: 700;
    color: var(--p-gray-900);
}
.portal-table-card-sub {
    font-size: 12px;
    color: var(--p-gray-400);
}

/* ── SECTION HEADERS (títulos de sección con subtítulo) ───────── */
.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
}
.section-head h3,
.section-head .section-title {
    font-family: 'Barlow Condensed', sans-serif !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    color: var(--p-gray-900) !important;
    margin: 0 !important;
}
.section-head p,
.section-head .section-subtitle {
    font-size: 12px;
    color: var(--p-gray-400);
    margin-top: 2px;
    margin-bottom: 0;
}

/* ── WELCOME BANNER (dashboard) ───────────────────────────────── */
.dash-welcome {
    background: linear-gradient(135deg, var(--p-gray-900) 0%, #2D2D2D 60%, #D41F2B 100%);
    border-radius: 8px;
    padding: 28px 36px;
    margin-bottom: 20px;
    color: white;
    position: relative;
    overflow: hidden;
}
.dash-welcome::before { display: none; }
.dash-welcome h2,
.dash-welcome .welcome-name {
    font-family: 'Barlow Condensed', sans-serif !important;
    font-size: 26px; font-weight: 700;
    margin-bottom: 4px;
    position: relative; z-index: 1;
}
.dash-welcome p,
.dash-welcome .welcome-sub {
    color: rgba(255,255,255,.55);
    font-size: 13px;
    position: relative; z-index: 1;
    margin: 0;
}

/* ── FILTER BAR mejorado ──────────────────────────────────────── */
.filter-bar-portal {
    background: white;
    border: 1px solid var(--p-gray-200);
    border-radius: 6px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.filter-bar-portal .filter-label {
    font-size: 11px; font-weight: 700;
    color: var(--p-gray-600);
    text-transform: uppercase; letter-spacing: .8px;
    margin-right: 4px;
    white-space: nowrap;
}
/* BEM helpers para filter-bar-portal */
.filter-bar-portal__group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.filter-bar-portal__group--search { flex: 1; min-width: 180px; }
.filter-bar-portal__label {
    font-size: 12px;
    font-weight: 600;
    color: #5B6670;
    white-space: nowrap;
    margin: 0;
}
.filter-bar-portal__select,
.filter-bar-portal__input {
    padding: 7px 12px;
    border: 1.5px solid var(--p-gray-200) !important;
    border-radius: 4px;
    font-family: 'Barlow', sans-serif;
    font-size: 13px;
    color: var(--p-gray-700);
    background: var(--p-gray-50);
    outline: none;
    transition: border-color .2s;
    box-shadow: none !important;
}
.filter-bar-portal__select { appearance: none; -webkit-appearance: none; padding-right: 28px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235B6670'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; }
.filter-bar-portal__input { width: 100%; }
.filter-bar-portal__select:focus,
.filter-bar-portal__input:focus {
    border-color: var(--p-red) !important;
    background: white;
}
.filter-bar-portal__clear {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: none;
    border: none;
    font-family: 'Barlow', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #8A9399;
    cursor: pointer;
    white-space: nowrap;
    transition: color .15s;
    line-height: 1;
    text-decoration: none;
}
.filter-bar-portal__clear:hover {
    color: var(--p-red);
}

.filter-bar-portal select,
.filter-bar-portal input[type="text"],
.filter-bar-portal input[type="month"],
.filter-bar-portal input[type="date"] {
    padding: 7px 12px;
    border: 1.5px solid var(--p-gray-200) !important;
    border-radius: 4px;
    font-family: 'Barlow', sans-serif;
    font-size: 13px; color: var(--p-gray-700);
    background: var(--p-gray-50);
    outline: none;
    transition: border-color .2s;
    box-shadow: none !important;
}
.filter-bar-portal select:focus,
.filter-bar-portal input:focus {
    border-color: var(--p-red) !important;
    background: white;
}

/* ── PORTAL BADGES ────────────────────────────────────────────── */
.portal-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .3px;
    white-space: nowrap;
    line-height: 1.6;
}
.portal-badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Variantes */
.portal-badge--pendiente {
    background: #fff4e5;
    color: #b76e00;
}
.portal-badge--pendiente::before { background: #f39c12; }

.portal-badge--pagada {
    background: #eafaf1;
    color: #1a7a45;
}
.portal-badge--pagada::before { background: #27ae60; }

.portal-badge--aplicada {
    background: #eaf3fb;
    color: #1a5c8a;
}
.portal-badge--aplicada::before { background: #69A9E3; }

.portal-badge--no-procesada {
    background: #e6f4fb;
    color: #1a6a96;
}
.portal-badge--no-procesada::before { background: #69A9E3; }

.portal-badge--nc {
    background: #fdecea;
    color: #a01b14;
}
.portal-badge--nc::before { background: var(--p-red); }

/* Estados de facturas subidas al portal (diferenciados del "En proceso" de SAP) */
.portal-badge--recibida {
    background: #eef2ff;
    color: #4338ca;
}
.portal-badge--recibida::before { background: #6366f1; }

.portal-badge--revision {
    background: #f3e8ff;
    color: #7c3aed;
}
.portal-badge--revision::before { background: #a855f7; }

/* ── INFO CARDS (avisos / aclaraciones laterales) ─────────────── */
.info-card {
    display: flex;
    gap: 14px;
    padding: 18px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    border-left: 3px solid var(--p-blue);
}
.info-card--warning {
    border-left-color: var(--p-orange);
}
.info-card__icon {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #eaf3fb;
    display: flex;
    align-items: center;
    justify-content: center;
}
.info-card--warning .info-card__icon {
    background: #fff4e5;
}
.info-card__icon .material-icons-round {
    font-size: 18px;
    color: var(--p-blue);
}
.info-card--warning .info-card__icon .material-icons-round {
    color: var(--p-orange);
}
.info-card__body {
    flex: 1;
    min-width: 0;
}
.info-card__title {
    font-family: 'Barlow Condensed', sans-serif !important;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: var(--p-gray-700);
    margin-bottom: 8px;
}
.info-card__text {
    font-size: 13px;
    color: var(--p-gray-600);
    line-height: 1.6;
    margin-bottom: 6px;
}
.info-card__list {
    margin: 0;
    padding-left: 16px;
    font-size: 13px;
    color: var(--p-gray-600);
    line-height: 1.7;
}
.info-card__list li {
    margin-bottom: 4px;
}
.info-card__list li:last-child {
    margin-bottom: 0;
}

/* ── FAQ ACORDEÓN ─────────────────────────────────────────────── */
.faq-section-label {
    font-family: 'Barlow Condensed', sans-serif !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--p-gray-400);
    padding: 0 0 8px 4px;
    margin-bottom: 4px;
}
.faq-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    margin-bottom: 6px;
    overflow: hidden;
}
.faq-item[open] {
    border-left: 3px solid var(--p-red);
}
.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--p-gray-700);
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
    content: 'expand_more';
    font-family: 'Material Icons Round';
    font-size: 18px;
    color: var(--p-gray-400);
    flex-shrink: 0;
    transition: transform .2s ease;
}
.faq-item[open] .faq-question::after {
    transform: rotate(180deg);
    color: var(--p-red);
}
.faq-item[open] .faq-question {
    color: var(--p-red);
}
.faq-answer {
    padding: 0 16px 14px 16px;
    font-size: 13px;
    color: var(--p-gray-600);
    line-height: 1.7;
    border-top: 1px solid #f1f3f5;
    padding-top: 12px;
}
.faq-answer a {
    color: var(--p-red);
    text-decoration: none;
}
.faq-answer a:hover { text-decoration: underline; }

/* ── POLICY BLOCKS ────────────────────────────────────────────── */
.policy-block {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    border-left: 3px solid var(--p-blue);
}
.policy-block__icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #eaf3fb;
    display: flex;
    align-items: center;
    justify-content: center;
}
.policy-block__icon--warning { background: #fff4e5; }
.policy-block__icon--success { background: #eafaf1; }
.policy-block__icon .material-icons-round { font-size: 20px; color: var(--p-blue); }
.policy-block__icon--warning .material-icons-round { color: var(--p-orange); }
.policy-block__icon--success .material-icons-round { color: var(--p-green); }
.policy-block__body { flex: 1; min-width: 0; }
.policy-block__title {
    font-family: 'Barlow Condensed', sans-serif !important;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
    color: var(--p-gray-700);
    margin-bottom: 10px;
}
.policy-block__body p {
    font-size: 13px;
    color: var(--p-gray-600);
    line-height: 1.7;
    margin-bottom: 8px;
}
.policy-block__body a {
    color: var(--p-red);
    text-decoration: none;
}
.policy-block__body a:hover { text-decoration: underline; }
.policy-block__address {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 10px;
    padding: 10px 12px;
    background: var(--p-gray-100);
    border-radius: 4px;
    font-size: 13px;
    color: var(--p-gray-600);
    line-height: 1.6;
}
.policy-block__address .material-icons-round {
    font-size: 16px;
    color: var(--p-red);
    margin-top: 2px;
    flex-shrink: 0;
}

/* ── PROFILE BANNER ───────────────────────────────────────────── */
.profile-banner {
    position: relative;
    overflow: hidden;
    background: url('/assets/img/fondo_gris_oscuro.png') center/cover no-repeat;
    padding: 28px 32px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.profile-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, transparent 45%, rgba(211,31,43,.30) 100%),
        linear-gradient(rgba(0,0,0,.46), rgba(0,0,0,.46));
    z-index: 0;
}
.profile-banner .shb-circle--lg,
.profile-banner .shb-circle--sm { display: none; }
.profile-banner__avatar {
    position: relative;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    border: 2px solid rgba(255,255,255,.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Barlow Condensed', sans-serif !important;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0;
}
.profile-banner__avatar { position: relative; z-index: 1; }
.profile-banner__info { position: relative; z-index: 1; }
.profile-banner__name {
    font-family: 'Barlow Condensed', sans-serif !important;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 4px;
}
.profile-banner__meta {
    font-size: 12px;
    color: rgba(255,255,255,.6);
    letter-spacing: .3px;
}
.profile-banner__sep {
    margin: 0 6px;
    opacity: .5;
}

/* ── PROFILE FORM FIELDS ──────────────────────────────────────── */
.profile-field {
    margin-bottom: 18px;
}
.profile-field__label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--p-gray-400);
    margin-bottom: 5px;
}
.profile-field__input {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--p-gray-700);
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
    font-family: 'Barlow', sans-serif !important;
    -moz-appearance: none;
    -webkit-appearance: none;
    appearance: none;
}
.profile-field__input:focus {
    border-color: var(--p-red);
    box-shadow: 0 0 0 3px rgba(230,51,41,.08);
}
.profile-field__input.is-invalid {
    border-color: #dc3545;
}
.profile-field__select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}
.profile-field__error {
    font-size: 12px;
    color: #dc3545;
    margin-top: 4px;
}
.profile-field__hint {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--p-gray-400);
    margin-top: 4px;
}
.profile-field__hint .material-icons-round {
    font-size: 14px;
}

/* ── PORTAL BUTTON ────────────────────────────────────────────── */
.portal-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Barlow', sans-serif !important;
    border: none;
    cursor: pointer;
    transition: background .15s ease, opacity .15s ease;
    text-decoration: none;
}
.portal-btn--primary {
    background: var(--p-red);
    color: #fff;
}
.portal-btn--primary:hover { background: var(--p-red); color: #fff; }
.portal-btn--primary:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* ── RECIBO EMISOR ────────────────────────────────────────────── */
.recibo-emisor-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid var(--p-gray-200);
}
.recibo-emisor-row:last-child { border-bottom: none; }
.recibo-emisor-label {
    font-size: 11px;
    color: var(--p-gray-400);
    white-space: nowrap;
}
.recibo-emisor-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--p-gray-700);
    text-align: right;
}

/* ── UPLOAD SLOTS ─────────────────────────────────────────────── */
.upload-slots {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.upload-slot {
    flex: 1 1 0;
    min-width: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 8px;
    border: 2px dashed #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: border-color .15s, background .15s;
    min-height: 110px;
}
.upload-slot:hover {
    border-color: var(--p-red);
    background: #fff8f8;
}
.upload-slot--active {
    border-style: solid;
    border-color: var(--p-green);
    background: #f0faf4;
}
.upload-slot--error {
    border-color: #dc3545;
}
.upload-slot__icon {
    font-size: 28px;
    color: var(--p-gray-400);
}
.upload-slot--active .upload-slot__icon { color: var(--p-green); }
.upload-slot__icon--pdf { color: #e74c3c !important; }
.upload-slot__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--p-gray-600);
}
.upload-slot__hint {
    font-size: 11px;
    color: var(--p-gray-400);
}
.upload-slot__filename {
    font-size: 10px;
    color: var(--p-gray-600);
    word-break: break-all;
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.upload-slot__preview {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 3px;
}

/* ── DASHBOARD: WELCOME BANNER ───────────────────────────────── */
.dash-welcome {
    position: relative;
    overflow: hidden;
    background: url('/assets/img/fondo_gris_oscuro.png') center/cover no-repeat;
    padding: 32px 36px;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}
.dash-welcome::before {
    content: '';
    display: block;
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, transparent 45%, rgba(211,31,43,.30) 100%),
        linear-gradient(rgba(0,0,0,.45), rgba(0,0,0,.45));
    z-index: 0;
}
.dash-welcome .shb-rect { display: none; }
.dash-welcome__body { position: relative; z-index: 1; }
.dash-welcome__greeting {
    font-size: 12px;
    color: rgba(255,255,255,.55);
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-bottom: 4px;
}
.dash-welcome__name {
    font-family: 'Barlow Condensed', sans-serif !important;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 6px;
}
.dash-welcome__meta {
    font-size: 12px;
    color: rgba(255,255,255,.55);
}
.dash-welcome__links { position: relative; z-index: 1;
    position: relative;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.dash-welcome__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    background: rgba(255,255,255,.15);
    color: #fff !important;
    border: 1px solid rgba(255,255,255,.25);
    transition: background .15s;
}
.dash-welcome__btn:hover { background: rgba(255,255,255,.25); }
.dash-welcome__btn--outline {
    background: transparent;
    border-color: rgba(255,255,255,.3);
}
.dash-welcome__btn .material-icons-round { font-size: 16px; }

/* ── DASHBOARD: CARD CUENTA CORRIENTE ───────────────────────── */
.cta-cte-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 18px 24px;
}
.cta-cte-card__header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}
.cta-cte-card__icon {
    width: 42px;
    height: 42px;
    border-radius: 4px;
    background: #eaf3fb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cta-cte-card__icon .material-icons-round {
    color: var(--p-blue);
    font-size: 22px;
}
.cta-cte-card__title {
    font-size: 14px;
    font-weight: 700;
    color: #5B6670;
    line-height: 1.3;
}
.cta-cte-card__sub {
    font-size: 12px;
    color: #5B6670;
    margin-top: 2px;
}
.cta-cte-card__link {
    font-size: 13px;
    font-weight: 600;
    color: var(--p-blue-dark);
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}
.cta-cte-card__link:hover { text-decoration: underline; }
.cta-cte-card__amounts {
    display: flex;
    align-items: center;
    gap: 0;
    border-top: 1px solid #f0f2f5;
    padding-top: 14px;
}
.cta-cte-card__amount {
    flex: 1;
    padding: 0 24px;
}
.cta-cte-card__amount:first-child { padding-left: 0; }
.cta-cte-card__currency {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #8A9399;
    margin-bottom: 4px;
}
.cta-cte-card__value {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--p-blue-dark);
    line-height: 1;
}
.cta-cte-card__value--usd { color: var(--p-blue-dark); }
.cta-cte-card__divider {
    width: 1px;
    height: 44px;
    background: #e9ecef;
    flex-shrink: 0;
}

/* ── FACTURAS: CARDS DE TOTALES ──────────────────────────────── */
.fact-total-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 16px 20px;
}
.fact-total-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.fact-total-card__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #8A9399;
    margin-bottom: 4px;
}
.fact-total-card__value {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--p-blue-dark);
    line-height: 1;
}
.fact-total-card__value--usd { color: var(--p-blue-dark); }
.fact-total-card__value--nc  { color: var(--p-orange); }
.fact-total-card--neto {
    border-left: 3px solid var(--p-blue-dark);
}

/* ── FACTURAS: TARJETA POR ORDEN DE PAGO ─────────────────────── */
.fact-op-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    overflow: hidden;
}
.fact-op-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 20px;
    background: #f7f8fa;
    border-bottom: 1px solid #e9ecef;
    border-left: 4px solid var(--p-red);
}
.fact-op-card__header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.fact-op-card__icon {
    font-size: 20px;
    color: var(--p-red);
    flex-shrink: 0;
}
.fact-op-card__op {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #2d2d2d;
    letter-spacing: .2px;
    line-height: 1.2;
}
.fact-op-card__date {
    font-size: 12px;
    color: #8A9399;
    margin-top: 1px;
}
.fact-op-card__header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.fact-op-card__total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.fact-op-card__total-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #8A9399;
    line-height: 1;
    margin-bottom: 2px;
}
.fact-op-card__total-value {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #2d2d2d;
    font-variant-numeric: tabular-nums;
}
.fact-op-card__total-value--usd { color: var(--p-blue-dark); }
.fact-op-card__total-value--nc  { color: var(--p-orange); }
.fact-op-card__count {
    font-size: 11px;
    color: #8A9399;
    background: #e9ecef;
    border-radius: 10px;
    padding: 3px 10px;
    white-space: nowrap;
}
.fact-op-card__chevron {
    font-size: 20px;
    color: #8A9399;
    transition: transform .22s ease;
    flex-shrink: 0;
    margin-left: 4px;
}
.fact-op-card__chevron--open {
    transform: rotate(180deg);
    color: var(--p-red);
}
.fact-op-card__download-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--p-red);
    background: #fdecea;
    border-radius: 4px;
    padding: 3px 6px;
    text-decoration: none;
    margin-left: 8px;
    vertical-align: middle;
    font-size: 11px;
    font-weight: 600;
    gap: 3px;
    transition: background .18s, color .18s;
}
.fact-op-card__download-icon i {
    font-size: 15px;
    line-height: 1;
}
.fact-op-card__download-icon:hover {
    background: var(--p-red);
    color: #fff;
    text-decoration: none;
}
/* Etiqueta de moneda inline (ARS / USD) antes del importe */
.fact-currency-label {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .4px;
    color: #8A9399;
    background: #f0f2f5;
    border-radius: 3px;
    padding: 1px 5px;
    margin-right: 4px;
    vertical-align: middle;
}

/* Tabla interna de cada OP card */
.fact-op-card__table thead th {
    background: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: #8A9399;
    border-bottom: 1px solid #f0f0f0;
    padding: 8px 12px;
}
.fact-op-card__table tbody td {
    padding: 9px 12px;
    border-bottom: 1px solid #f7f8fa;
    font-size: 13px;
    vertical-align: middle;
}
.fact-op-card__table tbody tr:last-child td { border-bottom: none; }
.fact-op-card__table tbody tr:hover td { background: #fafbfc; }

/* Badge de tipo FC / NC */
.fact-tipo-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 3px;
    letter-spacing: .3px;
}
.fact-tipo-badge--fc {
    background: #eaf3fb;
    color: var(--p-blue-dark);
}
.fact-tipo-badge--nc {
    background: #fff4e5;
    color: var(--p-orange);
}
.fact-tipo-badge--nd {
    background: #f0f4f8;
    color: #5B6670;
}

/* Separador de header de tabla */
.portal-table-card-header__sub {
    font-size: 11px;
    color: #8A9399;
    font-weight: 400;
    margin-left: 8px;
}

/* ── RETENCIONES: BADGES DE TIPO ─────────────────────────────── */
.ret-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 4px;
    white-space: nowrap;
}
.ret-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ret-badge--ganancias { background: #fff4e5; color: var(--p-orange); }
.ret-badge--ganancias::before { background: var(--p-orange); }
.ret-badge--iibb      { background: #f0f4f8; color: #5B6670; }
.ret-badge--iibb::before { background: #5B6670; }
.ret-badge--iva       { background: #fdecea; color: var(--p-red); }
.ret-badge--iva::before { background: var(--p-red); }
.ret-badge--otros     { background: #eaf3fb; color: var(--p-blue-dark); }
.ret-badge--otros::before { background: var(--p-blue-dark); }

/* ── RETENCIONES: TOTALES ────────────────────────────────────── */
.ret-totals {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 16px 24px;
}
.ret-totals__item {
    padding: 0 32px 0 0;
    margin-right: 32px;
    border-right: 1px solid #e9ecef;
}
.ret-totals__item:last-child {
    border-right: none;
    margin-right: 0;
    padding-right: 0;
    margin-left: auto;
}
.ret-totals__label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #8A9399;
    margin-bottom: 3px;
}
.ret-totals__value {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #2d2d2d;
}
.ret-totals__item--total .ret-totals__value {
    font-size: 24px;
    color: var(--p-red);
}

/* ── PORTAL: BOTÓN ICONO PDF ─────────────────────────────────── */
.portal-btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    text-decoration: none;
    transition: background .15s;
}
.portal-btn-icon--pdf {
    background: #fdecea;
    color: var(--p-red);
}
.portal-btn-icon--pdf:hover {
    background: #f5c6c4;
    color: var(--p-red);
}

/* ── DASHBOARD: LISTA RETENCIONES ───────────────────────────── */
.ret-list {
    border-top: 1px solid #f0f2f5;
    padding-top: 6px;
}
.ret-list__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 0;
    border-bottom: 1px solid #f5f6f8;
    gap: 12px;
}
.ret-list__item:last-child { border-bottom: none; }
.ret-list__label {
    font-size: 13px;
    color: #2d2d2d;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ret-list__code {
    font-size: 11px;
    font-weight: 700;
    background: #fdecea;
    color: var(--p-red);
    border-radius: 3px;
    padding: 2px 6px;
    flex-shrink: 0;
}
.ret-list__amount {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #5B6670;
    white-space: nowrap;
    flex-shrink: 0;
}
.ret-list__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 28px 0;
    color: #8A9399;
    font-size: 13px;
}

/* ── DASHBOARD: FILTRO KPI ───────────────────────────────────── */
.dash-kpi-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.dash-kpi-filter__group {
    display: flex;
    align-items: center;
    gap: 8px;
}
.dash-kpi-filter__label {
    font-size: 13px;
    font-weight: 600;
    color: #5B6670;
    white-space: nowrap;
    margin: 0;
}
.dash-kpi-filter__select {
    font-size: 13px;
    font-family: 'Barlow', sans-serif;
    color: #2d2d2d;
    background: #fff;
    border: 1px solid #dde1e6;
    border-radius: 4px;
    padding: 5px 28px 5px 10px;
    height: 34px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235B6670'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
}
.dash-kpi-filter__select:focus {
    outline: none;
    border-color: var(--p-blue);
    box-shadow: 0 0 0 3px rgba(105,169,227,.18);
}
.dash-kpi-filter__clear {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #5B6670;
    text-decoration: none;
    padding: 5px 10px;
    border: 1px solid #dde1e6;
    border-radius: 4px;
    background: #f8f9fa;
    transition: background .15s;
}
.dash-kpi-filter__clear:hover { background: #eee; color: #2d2d2d; }

/* ── DASHBOARD: KPI CARDS ─────────────────────────────────────── */
.kpi-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 18px 20px;
    height: 100%;
}
.kpi-card__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.kpi-card__icon .material-icons-round { font-size: 22px; }
.kpi-card__icon--blue  { background: #e8f0f8; }
.kpi-card__icon--blue  .material-icons-round { color: var(--p-blue-dark); }
.kpi-card__icon--orange{ background: #fff4e5; }
.kpi-card__icon--orange .material-icons-round { color: var(--p-orange); }
.kpi-card__icon--red   { background: #fdecea; }
.kpi-card__icon--red   .material-icons-round { color: var(--p-red); }
.kpi-card__icon--green { background: #eafaf1; }
.kpi-card__icon--green .material-icons-round { color: var(--p-green); }
.kpi-card__body { flex: 1; min-width: 0; }
.kpi-card__label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: var(--p-gray-400);
    margin-bottom: 4px;
}
.kpi-card__value {
    font-family: 'Barlow Condensed', sans-serif !important;
    font-size: 32px;
    font-weight: 700;
    color: var(--p-blue-dark);
    line-height: 1;
    margin-bottom: 4px;
}
.kpi-card__sub {
    font-size: 11px;
    color: var(--p-gray-400);
}

/* ── DASHBOARD: ACCESO RÁPIDO ─────────────────────────────────── */
.dash-ver-todas {
    font-size: 12px;
    color: var(--p-red);
    text-decoration: none;
    font-weight: 600;
}
.dash-ver-todas:hover { text-decoration: underline; }

.dash-quick-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 4px;
    border-bottom: 1px solid #f1f3f5;
    text-decoration: none !important;
    transition: background .12s;
    border-radius: 3px;
}
.dash-quick-link:hover { background: var(--p-gray-100); }
.dash-quick-link__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dash-quick-link__icon .material-icons-round { font-size: 20px; }
.dash-quick-link__text { flex: 1; min-width: 0; }
.dash-quick-link__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--p-gray-700);
    line-height: 1.3;
}
.dash-quick-link__sub {
    font-size: 11px;
    color: var(--p-gray-400);
}
.dash-quick-link__arrow {
    font-size: 18px !important;
    color: var(--p-gray-400);
    flex-shrink: 0;
}

/* ── HEADER PERFIL: remove excessive radius & shadows ─────────── */
.page-header {
    border-radius: 0 !important;
}

/* ── TOPBAR: asegurar fondo blanco y sin sombra ──────────────── */
.navbar-main {
    box-shadow: none !important;
}

/* ── LIVEWIRE LOADING OVERLAY ────────────────────────────────── */
/* Overlay inyectado vía JS en document.body (facturas-index.blade.php @push js) — sin clase CSS */

/* ── MENSAJERÍA INTERNA ──────────────────────────────────────── */
.msg-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    background: #fff;
    border: 1px solid var(--p-gray-200);
    border-radius: 8px;
    overflow: hidden;
    min-height: 560px;
}
.msg-sidebar {
    border-right: 1px solid var(--p-gray-200);
    overflow-y: auto;
}
.msg-sidebar-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--p-gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.msg-sidebar-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--p-gray-900);
}
.btn-new-msg {
    background: var(--p-red);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-family: 'Barlow', sans-serif;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: .5px;
    transition: background .2s;
}
.btn-new-msg:hover { background: var(--p-red-dark); }
.msg-thread {
    padding: 14px 16px;
    border-bottom: 1px solid var(--p-gray-100);
    transition: background .15s;
    position: relative;
}
.msg-thread:hover { background: var(--p-gray-50); }
.msg-thread.active {
    background: #FFF0EF;
    border-left: 3px solid var(--p-red);
}
.msg-thread-from {
    font-size: 12px;
    font-weight: 700;
    color: var(--p-gray-900);
    margin-bottom: 2px;
}
.msg-thread-subject {
    font-size: 11px;
    color: var(--p-gray-600);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.msg-thread-date {
    font-size: 10px;
    color: var(--p-gray-400);
}
.msg-unread-dot {
    position: absolute;
    top: 18px;
    right: 14px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--p-red);
}
.msg-main {
    display: flex;
    flex-direction: column;
}
.msg-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--p-gray-200);
}
.msg-header-subject {
    font-size: 16px;
    font-weight: 700;
    color: var(--p-gray-900);
    margin-bottom: 4px;
}
.msg-header-meta {
    font-size: 11px;
    color: var(--p-gray-400);
}
.msg-body {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 300px;
    max-height: 380px;
}
.msg-bubble-wrap {
    display: flex;
    flex-direction: column;
}
.msg-bubble-wrap.sent { align-items: flex-end; }
.msg-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.55;
}
.msg-bubble.received {
    background: var(--p-gray-100);
    color: #3d3d3d;
    border-top-left-radius: 2px;
}
.msg-bubble.sent {
    background: var(--p-red);
    color: #fff;
    border-top-right-radius: 2px;
}
.msg-bubble-meta {
    font-size: 10px;
    color: var(--p-gray-400);
    margin-top: 4px;
}
.msg-bubble-wrap.sent .msg-bubble-meta { text-align: right; }
.msg-compose {
    padding: 16px 20px;
    border-top: 1px solid var(--p-gray-200);
    display: flex;
    gap: 10px;
    align-items: center;
}
.msg-compose textarea {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid var(--p-gray-200);
    border-radius: 4px;
    font-family: 'Barlow', sans-serif;
    font-size: 13px;
    resize: none;
    outline: none;
    line-height: 1.5;
    transition: border-color .2s;
}
.msg-compose textarea:focus { border-color: var(--p-red); }
.btn-send {
    background: var(--p-red);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    font-family: 'Barlow', sans-serif;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: .5px;
    transition: background .2s;
    height: 40px;
}
.btn-send:hover { background: var(--p-red-dark); }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 1199.98px) {
    .sidenav {
        width: var(--p-sidebar-w) !important;
    }
    .sidenav.fixed-start + .main-content {
        margin-left: 0 !important;
    }
}
