/* ==========================================================================
   Intranet MSI — tema visual alineado a TESI v3
   Tokens tomados de tesi-v3/resources/css/theme.css (mismos nombres del Figma).
   Se monta SOBRE AdminLTE 3 / Bootstrap 4: no reemplaza su JS (modales,
   dropdowns, datatables), solo la piel.
   ========================================================================== */

:root {
    --BPrincipal: #205c40;
    --BPrincipal_Dark: #103323;
    --BSecundario: #006cdb;
    --BSecundario_Dark: #2a384f;
    --BAcento: #8bc500;
    --Success: #379d6d;
    --Info: #a0cfff;
    --Warning: #ffaf2d;
    --Error: #cb2f26;
    --Bg_header: #e5ede7;
    --Bg_footer: #e2ebf6;
    --Gris-50: #fafbfd;
    --Gris-100: #f5f6f9;
    --Gris-200: #e6e8ee;
    --Gris-500: #6b7280;
    --Gris-700: #374151;
    --Gris-900: #171a1f;

    --radius-field: 0.25rem;
    --radius-box: 0.5rem;
    --shadow-card: 0 1px 2px rgba(16, 51, 35, 0.06), 0 1px 3px rgba(16, 51, 35, 0.04);
    --shadow-pop: 0 10px 30px rgba(16, 51, 35, 0.14);
    --font-sans: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
body.tesi,
body.tesi .content-wrapper,
body.tesi h1, body.tesi h2, body.tesi h3, body.tesi h4, body.tesi h5, body.tesi h6,
body.tesi p, body.tesi a, body.tesi li, body.tesi td, body.tesi th, body.tesi label,
body.tesi input, body.tesi select, body.tesi textarea, body.tesi button,
body.tesi .btn, body.tesi .dropdown-item, body.tesi .nav-link {
    font-family: var(--font-sans) !important;
}

body.tesi {
    font-weight: 400 !important;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--Gris-700);
    background: var(--Gris-50);
    -webkit-font-smoothing: antialiased;
}

body.tesi .content-wrapper { background: var(--Gris-50); }
body.tesi h1, body.tesi h2, body.tesi h3, body.tesi h4, body.tesi h5 {
    color: var(--Gris-900);
    font-weight: 700;
    letter-spacing: -0.01em;
}
body.tesi p { text-align: left; }
body.tesi a { color: var(--BSecundario); }
body.tesi a:hover { color: var(--BSecundario_Dark); }
body.tesi ::selection { background: rgba(139, 197, 0, 0.35); }

/* --------------------------------------------------------------------------
   Sidebar (verde oscuro, item activo en verde principal — igual que v3)
   -------------------------------------------------------------------------- */
body.tesi .main-sidebar {
    background: var(--BPrincipal_Dark) !important;
    box-shadow: none !important;
}
body.tesi .main-sidebar .brand-link {
    display: flex;
    align-items: center;
    height: 64px;
    padding: 0 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: var(--BPrincipal_Dark) !important;
}
body.tesi .brand-link .tesi-brand-logo { height: 44px; width: auto; }
body.tesi .brand-link .tesi-brand-iso { display: none; height: 34px; width: 34px; border-radius: 50%; }
body.tesi .brand-link .tesi-brand-tag {
    margin-left: 0.6rem;
    padding-left: 0.6rem;
    border-left: 1px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
body.tesi.sidebar-mini.sidebar-collapse .brand-link { justify-content: center; padding: 0; }
body.tesi.sidebar-mini.sidebar-collapse .brand-link .tesi-brand-logo,
body.tesi.sidebar-mini.sidebar-collapse .brand-link .tesi-brand-tag { display: none; }
body.tesi.sidebar-mini.sidebar-collapse .brand-link .tesi-brand-iso { display: block; }
body.tesi.sidebar-mini.sidebar-collapse .main-sidebar:hover .brand-link { justify-content: flex-start; padding: 0 1rem; }
body.tesi.sidebar-mini.sidebar-collapse .main-sidebar:hover .tesi-brand-logo,
body.tesi.sidebar-mini.sidebar-collapse .main-sidebar:hover .tesi-brand-tag { display: inline-block; }
body.tesi.sidebar-mini.sidebar-collapse .main-sidebar:hover .tesi-brand-iso { display: none; }

body.tesi .sidebar { padding: 0.75rem 0.6rem 1.5rem; }
body.tesi .nav-sidebar .nav-header {
    padding: 1.1rem 0.75rem 0.4rem;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
body.tesi .nav-sidebar .nav-item { margin-bottom: 2px; }
body.tesi .nav-sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-box);
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color 0.15s ease;
}
body.tesi .nav-sidebar .nav-link p { margin: 0; white-space: normal; text-align: left; }
body.tesi .nav-sidebar .nav-link > i,
body.tesi .nav-sidebar .nav-link .nav-icon {
    width: 1.35rem;
    margin: 0 0.6rem 0 0;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}
body.tesi .nav-sidebar .nav-link:hover,
body.tesi .nav-sidebar .nav-link.active,
body.tesi .nav-sidebar .menu-open > .nav-link {
    background: var(--BPrincipal) !important;
    color: #fff !important;
    box-shadow: none !important;
}
body.tesi .nav-sidebar .nav-link.active { box-shadow: inset 3px 0 0 var(--BAcento) !important; }
body.tesi .nav-sidebar .nav-link > p { flex: 1; }
body.tesi .nav-sidebar .nav-link > p > .right { position: absolute; right: 0.75rem; top: 0.75rem; font-size: 0.7rem; opacity: 0.7; }
body.tesi .nav-sidebar .nav-treeview { padding: 2px 0 4px 0.85rem; }
body.tesi .nav-sidebar .nav-treeview .nav-link { font-size: 0.84rem; font-weight: 400; color: rgba(255, 255, 255, 0.8) !important; }
body.tesi .nav-sidebar .nav-treeview .nav-link > i,
body.tesi .nav-sidebar .nav-treeview .nav-icon { font-size: 0.4rem; width: 1rem; opacity: 0.7; }
body.tesi .os-theme-light > .os-scrollbar > .os-scrollbar-track > .os-scrollbar-handle { background: rgba(245, 246, 249, 0.18); }

/* --------------------------------------------------------------------------
   Barra superior
   -------------------------------------------------------------------------- */
body.tesi .main-header.navbar {
    min-height: 64px;
    padding: 0 1rem;
    background: var(--BPrincipal) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: none;
}
body.tesi .main-header .nav-link { color: rgba(255, 255, 255, 0.92) !important; border-radius: var(--radius-box); }
body.tesi .main-header .nav-link:hover { background: rgba(255, 255, 255, 0.1); color: #fff !important; }
body.tesi .tesi-topbar-title { color: rgba(255, 255, 255, 0.85); font-size: 0.85rem; font-weight: 500; padding-left: 0.5rem; }
body.tesi .tesi-topbar-title b { color: #fff; font-weight: 600; }
body.tesi .user-menu > .nav-link { display: flex; align-items: center; gap: 0.55rem; height: 44px; padding: 0 0.6rem; }
body.tesi .user-menu .user-image {
    float: none; margin: 0; width: 32px; height: 32px;
    border: 2px solid rgba(255, 255, 255, 0.35); box-shadow: none !important; object-fit: cover;
}
body.tesi .tesi-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); border: 2px solid rgba(255, 255, 255, 0.35); color: #fff; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.02em; }
body.tesi .user-menu .user-image { background: rgba(255, 255, 255, 0.16); }
body.tesi .user-menu .tesi-user-name { font-size: 0.85rem; font-weight: 600; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* dropdowns (el viejo era negro/gris con hover verde) */
body.tesi .dropdown-menu {
    margin-top: 6px;
    padding: 0.4rem;
    background: #fff !important;
    border: 1px solid var(--Gris-200);
    border-radius: var(--radius-box);
    box-shadow: var(--shadow-pop);
}
body.tesi .dropdown-item {
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    color: var(--Gris-700) !important;
    font-size: 0.875rem;
    font-weight: 500 !important;
}
body.tesi .dropdown-item i { width: 1.25rem; margin-right: 0.4rem; color: var(--Gris-500); }
body.tesi .dropdown-item:hover, body.tesi .dropdown-item:focus {
    background: rgba(32, 92, 64, 0.08) !important;
    color: var(--BPrincipal) !important;
    font-weight: 500 !important;
}
body.tesi .dropdown-item:hover i { color: var(--BPrincipal); }
body.tesi .dropdown-divider { margin: 0.35rem 0; border-color: var(--Gris-200); }
body.tesi .user-menu .dropdown-menu { width: 250px; }
body.tesi .tesi-user-card { padding: 0.6rem 0.75rem 0.7rem; border-bottom: 1px solid var(--Gris-200); margin-bottom: 0.35rem; }
body.tesi .tesi-user-card strong { display: block; color: var(--Gris-900); font-size: 0.875rem; line-height: 1.3; }
body.tesi .tesi-user-card span { color: var(--Gris-500); font-size: 0.78rem; }

/* --------------------------------------------------------------------------
   Encabezado de página (banda + filete verde lima, como x-app.page-header)
   -------------------------------------------------------------------------- */
body.tesi .content-header { padding: 0; }
body.tesi .content-header > .container-fluid { padding: 0; max-width: none; }
.tesi-page-header { background: var(--Bg_header); border-bottom: 3px solid var(--BAcento); }
.tesi-page-header__inner { max-width: 72rem; margin: 0 auto; padding: 1.5rem 1.5rem 1rem; }
.tesi-page-header__eyebrow {
    margin: 0 0 0.15rem; color: var(--BPrincipal);
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
}
.tesi-page-header__title { margin: 0; color: var(--BPrincipal_Dark) !important; font-size: 1.65rem; font-weight: 700; line-height: 1.2; }
.tesi-page-subtitle { max-width: 72rem; margin: 0 auto; padding: 1.25rem 1.5rem 0; color: var(--Gris-500); font-size: 1rem; }
.tesi-page-subtitle p { max-width: 80ch; margin: 0; }

/* Encabezado heredado (.header-valores, definido inline en cada vista): mientras una vista
   no se migre a <x-page-header>, igual toma la banda nueva. */
body.tesi .content-header > br { display: none; }
body.tesi .header-valores {
    padding: 1.5rem 1.5rem 1rem !important;
    background: var(--Bg_header) !important;
    border-bottom: 3px solid var(--BAcento);
    color: var(--BPrincipal_Dark) !important;
    font-family: var(--font-sans) !important;
    font-size: 1.65rem !important;
    font-weight: 700 !important;
    line-height: 1.2;
    text-align: left !important;
}
@media (min-width: 992px) { body.tesi .header-valores { padding: 1.5rem 2.5rem 1rem !important; } }

body.tesi .content { padding: 1.75rem 1.5rem 3rem; }
body.tesi .content > .container-fluid { max-width: 72rem; margin: 0 auto; padding: 0; }
body.tesi.tesi-wide .content > .container-fluid,
body.tesi.tesi-wide .tesi-page-header__inner { max-width: 90rem; }

@media (min-width: 992px) {
    .tesi-page-header__inner { padding: 1.5rem 2.5rem 1rem; }
    .tesi-page-subtitle { padding: 1.5rem 2.5rem 0; }
    body.tesi .content { padding: 2rem 2.5rem 4rem; }
}

/* --------------------------------------------------------------------------
   Tarjetas
   -------------------------------------------------------------------------- */
body.tesi .card {
    background: #fff;
    border: 1px solid var(--Gris-200);
    border-radius: var(--radius-box);
    box-shadow: var(--shadow-card) !important;
    overflow: hidden;
}
body.tesi .card-header {
    padding: 0.9rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid var(--Gris-200);
    color: var(--Gris-900);
    font-weight: 600;
}
body.tesi .card-header .card-title { font-size: 1rem; font-weight: 600; }
body.tesi .card-body { padding: 1.25rem; }
body.tesi .card-footer { background: var(--Gris-50); border-top: 1px solid var(--Gris-200); }
body.tesi .card.card-outline, body.tesi .card.card-primary.card-outline { border-top: 3px solid var(--BPrincipal); }

.tesi-section-title {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    margin: 0 0 0.9rem; color: var(--Gris-900); font-size: 1.05rem; font-weight: 700;
}
.tesi-section-title small { color: var(--Gris-500); font-size: 0.8rem; font-weight: 500; }

/* --------------------------------------------------------------------------
   Botones
   -------------------------------------------------------------------------- */
body.tesi .btn {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-field);
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: none !important;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
body.tesi .btn-sm { padding: 0.32rem 0.7rem; font-size: 0.8rem; }
body.tesi .btn-lg { padding: 0.7rem 1.4rem; font-size: 0.95rem; }
body.tesi .btn-flat { border-radius: var(--radius-field); }
body.tesi .btn:focus-visible { outline: 2px solid var(--BAcento); outline-offset: 2px; }

body.tesi .btn-primary, body.tesi .btn-success {
    background: var(--BPrincipal) !important; border-color: var(--BPrincipal) !important; color: #fff !important;
}
body.tesi .btn-primary:hover, body.tesi .btn-success:hover,
body.tesi .btn-primary:active, body.tesi .btn-success:active {
    background: var(--BPrincipal_Dark) !important; border-color: var(--BPrincipal_Dark) !important;
}
body.tesi .btn-info { background: var(--BSecundario) !important; border-color: var(--BSecundario) !important; color: #fff !important; }
body.tesi .btn-info:hover { background: var(--BSecundario_Dark) !important; border-color: var(--BSecundario_Dark) !important; }
body.tesi .btn-secondary, body.tesi .btn-default {
    background: #fff !important; border-color: var(--Gris-200) !important; color: var(--Gris-700) !important;
}
body.tesi .btn-secondary:hover, body.tesi .btn-default:hover { background: var(--Gris-100) !important; color: var(--Gris-900) !important; }
body.tesi .btn-danger { background: var(--Error) !important; border-color: var(--Error) !important; }
body.tesi .btn-warning { background: var(--Warning) !important; border-color: var(--Warning) !important; color: var(--Gris-900) !important; }
body.tesi .btn-outline-primary, body.tesi .btn-outline-success {
    background: transparent !important; border-color: var(--BPrincipal) !important; color: var(--BPrincipal) !important;
}
body.tesi .btn-outline-primary:hover, body.tesi .btn-outline-success:hover { background: var(--BPrincipal) !important; color: #fff !important; }
body.tesi .btn-pill { border-radius: var(--radius-field); padding: 0.5rem 1rem; }

/* --------------------------------------------------------------------------
   Formularios
   -------------------------------------------------------------------------- */
body.tesi label { margin-bottom: 0.3rem; color: var(--Gris-700); font-size: 0.85rem; font-weight: 600 !important; }
body.tesi .form-control, body.tesi .custom-select, body.tesi .custom-file-label {
    height: calc(2.5rem + 2px);
    border: 1px solid #d5d9e2;
    border-radius: var(--radius-field);
    color: var(--Gris-900);
    font-size: 0.9rem;
    box-shadow: none;
}
body.tesi textarea.form-control { height: auto; }
body.tesi .custom-file, body.tesi .custom-file-input { height: calc(2.5rem + 2px); }
body.tesi .custom-file-label { display: flex; align-items: center; }
body.tesi .custom-file-label::after { height: 2.5rem; display: flex; align-items: center; background: var(--Gris-100); color: var(--Gris-700); content: 'Examinar'; }
body.tesi .form-control:focus, body.tesi .custom-select:focus {
    border-color: var(--BPrincipal);
    box-shadow: 0 0 0 3px rgba(32, 92, 64, 0.15);
}
body.tesi .form-control::placeholder { color: #9aa1ad; }
body.tesi .input-group-text { background: var(--Gris-100); border-color: #d5d9e2; color: var(--Gris-500); }
body.tesi .form-text { color: var(--Gris-500); font-size: 0.78rem; }

/* --------------------------------------------------------------------------
   Tablas + DataTables
   -------------------------------------------------------------------------- */
body.tesi .table {
    width: 100%;
    margin-bottom: 0;
    color: var(--Gris-700);
    font-size: 0.875rem;
    box-shadow: none;
}
body.tesi .table thead th {
    padding: 0.7rem 1rem;
    background: var(--Gris-100);
    border-top: 0;
    border-bottom: 1px solid var(--Gris-200);
    color: var(--Gris-500);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}
body.tesi .table td { padding: 0.75rem 1rem; border-top: 1px solid var(--Gris-200); background: transparent; color: var(--Gris-700); vertical-align: middle; }
body.tesi .table-bordered, body.tesi .table-bordered td, body.tesi .table-bordered th { border-left: 0; border-right: 0; }
body.tesi .table-striped tbody tr:nth-of-type(odd) { background: transparent; }
body.tesi .table tbody tr:hover { background: rgba(32, 92, 64, 0.04); }
body.tesi .tesi-table-wrap { border: 1px solid var(--Gris-200); border-radius: var(--radius-box); overflow: hidden; background: #fff; }

body.tesi .dataTables_wrapper { font-size: 0.85rem; color: var(--Gris-500); }
body.tesi .dataTables_wrapper .row:first-child { padding: 0 0 0.9rem; align-items: center; }
body.tesi .dataTables_wrapper .row:last-child { padding-top: 0.9rem; align-items: center; }
body.tesi .dataTables_filter input, body.tesi .dataTables_length select {
    height: 2.25rem; border: 1px solid #d5d9e2; border-radius: var(--radius-field); padding: 0 0.6rem;
}
body.tesi .page-link { border: 1px solid var(--Gris-200); color: var(--Gris-700); font-size: 0.82rem; }
body.tesi .page-item.active .page-link { background: var(--BPrincipal); border-color: var(--BPrincipal); color: #fff; }
body.tesi .page-link:hover { background: var(--Gris-100); color: var(--BPrincipal); }
body.tesi table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before { background-color: var(--BPrincipal); }

/* --------------------------------------------------------------------------
   Modales, alertas, badges, acordeones
   -------------------------------------------------------------------------- */
body.tesi .modal-content { border: 0; border-radius: 0.75rem; box-shadow: var(--shadow-pop); overflow: hidden; }
body.tesi .modal-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--Gris-200); background: #fff !important; color: var(--Gris-900) !important; }
body.tesi .modal-header.bg-primary { background: var(--Bg_header) !important; border-bottom: 3px solid var(--BAcento); }
body.tesi .modal-title { font-size: 1.05rem; font-weight: 700; color: var(--Gris-900) !important; }
body.tesi .modal-header .close { color: var(--Gris-500) !important; text-shadow: none; opacity: 1; font-weight: 400; }
body.tesi .modal-body { padding: 1.25rem; }
body.tesi .modal-footer { padding: 0.9rem 1.25rem; border-top: 1px solid var(--Gris-200); background: var(--Gris-50); }
body.tesi .modal-backdrop.show { opacity: 0.45; background: var(--BPrincipal_Dark); }

body.tesi .alert { border: 1px solid transparent; border-left-width: 4px; border-radius: var(--radius-box); font-size: 0.9rem; color: var(--Gris-900) !important; }
body.tesi .alert a { color: inherit; text-decoration: underline; }
body.tesi .alert-success { background: #ebf6f0 !important; border-color: #cbe7d8; border-left-color: var(--Success); }
body.tesi .alert-info { background: #eef6ff !important; border-color: #d3e7ff; border-left-color: var(--BSecundario); }
body.tesi .alert-warning { background: #fff6e6 !important; border-color: #ffe3b0; border-left-color: var(--Warning); }
body.tesi .alert-danger { background: #fcedec !important; border-color: #f5cdca; border-left-color: var(--Error); }

body.tesi .badge { padding: 0.3em 0.6em; border-radius: 999px; font-weight: 600; }
body.tesi .badge-success, body.tesi .badge-primary { background: rgba(32, 92, 64, 0.12); color: var(--BPrincipal); }
body.tesi .text-success { color: var(--BPrincipal) !important; }
body.tesi .text-primary { color: var(--BSecundario) !important; }
body.tesi .bg-primary, body.tesi .bg-success { background-color: var(--BPrincipal) !important; }

/* --------------------------------------------------------------------------
   Páginas de contenido (RRHH, licencias, etc.): tipografía de lectura
   -------------------------------------------------------------------------- */
.tesi-prose { max-width: 80ch; color: var(--Gris-700); font-size: 0.975rem; line-height: 1.75; }
.tesi-prose h2 { margin: 2rem 0 0.6rem; font-size: 1.2rem; }
.tesi-prose h3 { margin: 1.5rem 0 0.5rem; font-size: 1.05rem; }
.tesi-prose ul { padding-left: 1.2rem; }
.tesi-prose li { margin-bottom: 0.35rem; }
.tesi-prose li::marker { color: var(--BAcento); }

/* banners de cabecera heredados (imágenes .jpg): se integran con bordes suaves */
body.tesi .tesi-hero-img { width: 100%; max-height: 260px; object-fit: cover; border-radius: var(--radius-box); border: 1px solid var(--Gris-200); }

/* --------------------------------------------------------------------------
   Home
   -------------------------------------------------------------------------- */
.tesi-welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.tesi-welcome h1 { margin: 0; font-size: 1.6rem; color: var(--BPrincipal_Dark); }
.tesi-welcome p { margin: 0.2rem 0 0; color: var(--Gris-500); }
.tesi-welcome__date { color: var(--Gris-500); font-size: 0.85rem; font-weight: 500; }

body.tesi .tesi-carousel { border-radius: 0.75rem; overflow: hidden; border: 1px solid var(--Gris-200); margin-bottom: 1.75rem; }
/* Los banners se disenan a 1945x722: se respeta esa proporcion para no recortarlos */
body.tesi .tesi-carousel .carousel-inner img { width: 100%; height: auto; aspect-ratio: 1945 / 722; object-fit: cover; }
body.tesi .tesi-carousel .carousel-indicators { margin-bottom: 0.6rem; }
body.tesi .tesi-carousel .carousel-indicators li { width: 8px; height: 8px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.6); }
body.tesi .tesi-carousel .carousel-indicators li.active { background: var(--BAcento); }
body.tesi .tesi-carousel .carousel-control-prev, body.tesi .tesi-carousel .carousel-control-next { width: 8%; }

.tesi-quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.tesi-quick {
    display: flex; align-items: center; gap: 0.9rem;
    padding: 1rem 1.1rem;
    background: #fff; border: 1px solid var(--Gris-200); border-radius: var(--radius-box);
    box-shadow: var(--shadow-card);
    color: var(--Gris-900) !important; text-decoration: none !important;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.tesi-quick:hover { border-color: var(--BPrincipal); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(16, 51, 35, 0.1); }
.tesi-quick__icon {
    flex: 0 0 auto; display: grid; place-items: center;
    width: 44px; height: 44px; border-radius: 50%;
    background: var(--Bg_footer); color: var(--BPrincipal); font-size: 1.05rem;
}
.tesi-quick__text strong { display: block; font-size: 0.92rem; font-weight: 600; line-height: 1.25; }
.tesi-quick__text span { color: var(--Gris-500); font-size: 0.78rem; }
.tesi-quick__arrow { margin-left: auto; color: #b6bcc8; font-size: 0.75rem; }
.tesi-quick:hover .tesi-quick__arrow { color: var(--BPrincipal); }

.tesi-home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.5rem; align-items: start; }
@media (max-width: 1199px) { .tesi-home-grid { grid-template-columns: 1fr; } }
.tesi-news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 767px) { .tesi-news-grid { grid-template-columns: 1fr; } }
.tesi-empty { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 2.5rem 1.5rem; text-align: center; color: var(--Gris-500); }
.tesi-empty i { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--Bg_footer); color: var(--BPrincipal); font-size: 1.2rem; }
.tesi-empty strong { color: var(--Gris-900); font-size: 0.98rem; }
.tesi-empty span { font-size: 0.85rem; max-width: 42ch; }
.tesi-news { display: flex; flex-direction: column; height: 100%; }
.tesi-news__img { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; background: var(--Bg_header); display: block; }
.tesi-news__img--empty { object-fit: contain; padding: 1.5rem; }
.tesi-news__body { display: flex; flex-direction: column; gap: 0.4rem; flex: 1; padding: 1rem 1.1rem 1.1rem; }
.tesi-news__date { color: var(--Gris-500); font-size: 0.76rem; font-weight: 500; }
.tesi-news__title { margin: 0; font-size: 0.98rem !important; font-weight: 700; line-height: 1.35; color: var(--Gris-900); text-transform: none; }
.tesi-news__link { margin-top: auto; padding-top: 0.5rem; color: var(--BSecundario); font-size: 0.85rem; font-weight: 600; }
.tesi-news__link i { font-size: 0.7rem; margin-left: 0.25rem; }
.tesi-news--empty .tesi-news__title { color: var(--Gris-500); font-weight: 600; }

.tesi-side-card { margin-bottom: 1rem; }
.tesi-side-card .card-body { padding: 1rem; }
.tesi-bday { display: flex; align-items: center; gap: 0.6rem; padding: 0.45rem 0; border-top: 1px solid var(--Gris-100); font-size: 0.85rem; color: var(--Gris-700); }
.tesi-bday:first-of-type { border-top: 0; }
.tesi-bday__dot { flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(139, 197, 0, 0.18); color: var(--BPrincipal); font-size: 0.75rem; }

/* flatpickr inline con la paleta */
body.tesi .flatpickr-calendar.inline { width: 100%; box-shadow: none; border: 0; font-family: var(--font-sans); }
body.tesi .flatpickr-calendar.inline .flatpickr-rContainer,
body.tesi .flatpickr-calendar.inline .flatpickr-days,
body.tesi .flatpickr-calendar.inline .dayContainer { width: 100%; min-width: 0; max-width: none; }
body.tesi .flatpickr-day { max-width: none; border-radius: 0.375rem; color: var(--Gris-700); }
body.tesi .flatpickr-day.today { border-color: var(--BAcento); }
body.tesi .flatpickr-day.selected, body.tesi .flatpickr-day.selected:hover { background: var(--BPrincipal); border-color: var(--BPrincipal); color: #fff; }
body.tesi .flatpickr-day.prevMonthDay, body.tesi .flatpickr-day.nextMonthDay { color: #c3c8d2; }
body.tesi .flatpickr-current-month { font-size: 0.95rem; font-weight: 600; }
body.tesi span.flatpickr-weekday { color: var(--Gris-500); font-weight: 600; font-size: 0.72rem; }

/* --------------------------------------------------------------------------
   Pie
   -------------------------------------------------------------------------- */
body.tesi .main-footer {
    padding: 1rem 1.5rem;
    background: var(--Bg_footer);
    border-top: 0;
    color: var(--Gris-500);
    font-size: 0.8rem;
}
body.tesi .main-footer strong { color: var(--BSecundario_Dark); font-weight: 600; }

/* barra de carga (Pace) en el acento */
body.tesi .pace .pace-progress { background: var(--BAcento); }

/* ==========================================================================
   Pantallas publicas (login / primer ingreso) — layouts/auth.blade.php
   No dependen de Bootstrap ni de AdminLTE.
   ========================================================================== */
body.tesi-auth {
    margin: 0;
    min-height: 100vh;
    background: var(--Gris-50);
    color: var(--Gris-700);
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
body.tesi-auth *, body.tesi-auth *::before, body.tesi-auth *::after { box-sizing: border-box; }
.tesi-auth__shell { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: 100vh; }

.tesi-auth__brand {
    position: relative;
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 3rem 3.5rem;
    background:
        radial-gradient(90% 60% at 0% 100%, rgba(139, 197, 0, 0.22), transparent 60%),
        linear-gradient(160deg, var(--BPrincipal) 0%, var(--BPrincipal_Dark) 78%);
    color: #fff;
    overflow: hidden;
}
.tesi-auth__brand::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--BAcento);
}
.tesi-auth__logo { width: 190px; height: auto; }
.tesi-auth__claim { max-width: 30rem; }
.tesi-auth__eyebrow { display: inline-block; margin-bottom: 0.9rem; color: var(--BAcento); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; }
.tesi-auth__claim h1 { margin: 0 0 1rem; font-size: clamp(1.9rem, 2.8vw, 2.6rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; color: #fff; }
.tesi-auth__claim p { margin: 0; color: rgba(255, 255, 255, 0.82); font-size: 1rem; }
.tesi-auth__foot { color: rgba(255, 255, 255, 0.6); font-size: 0.8rem; }

.tesi-auth__panel { display: grid; place-items: center; padding: 2.5rem 1.5rem; }
.tesi-auth__card { width: 100%; max-width: 27rem; }
.tesi-auth__logo-mobile { display: none; width: 170px; margin: 0 0 2rem; }
.tesi-auth__head { margin-bottom: 1.75rem; }
.tesi-auth__head h2 { margin: 0 0 0.35rem; color: var(--BPrincipal_Dark); font-size: 1.6rem; font-weight: 700; letter-spacing: -0.01em; }
.tesi-auth__head p { margin: 0; color: var(--Gris-500); }

.tesi-form { display: flex; flex-direction: column; gap: 1.1rem; }
.tesi-field { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.tesi-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.tesi-field label { color: var(--Gris-700); font-size: 0.85rem; font-weight: 600; }
.tesi-field input {
    width: 100%; height: 2.85rem; padding: 0 0.85rem;
    background: #fff; border: 1px solid #d5d9e2; border-radius: var(--radius-field);
    color: var(--Gris-900); font: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.tesi-field input:focus { outline: 0; border-color: var(--BPrincipal); box-shadow: 0 0 0 3px rgba(32, 92, 64, 0.15); }
.tesi-field input.is-invalid { border-color: var(--Error); }
.tesi-field__hint { color: var(--Gris-500); font-size: 0.78rem; }
.tesi-field__error { color: var(--Error); font-size: 0.8rem; font-weight: 500; }

.tesi-btn {
    display: inline-flex; align-items: center; justify-content: center;
    height: 2.85rem; padding: 0 1.4rem;
    border: 1px solid transparent; border-radius: var(--radius-field);
    font: inherit; font-weight: 600; cursor: pointer;
    transition: background-color 0.15s ease;
}
.tesi-btn--primary { background: var(--BPrincipal); color: #fff; }
.tesi-btn--primary:hover { background: var(--BPrincipal_Dark); }
.tesi-btn:focus-visible { outline: 2px solid var(--BAcento); outline-offset: 2px; }
.tesi-btn--block { width: 100%; margin-top: 0.4rem; }

.tesi-auth__links { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--Gris-200); font-size: 0.875rem; }
.tesi-auth__links--center { justify-content: center; }
.tesi-auth__links a, .tesi-link { padding: 0; background: none; border: 0; color: var(--BSecundario); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.tesi-auth__links a:hover, .tesi-link:hover { text-decoration: underline; }

.tesi-dialog { width: min(92vw, 28rem); padding: 1.75rem; border: 0; border-radius: 0.75rem; box-shadow: var(--shadow-pop); color: var(--Gris-700); font-family: var(--font-sans); }
.tesi-dialog::backdrop { background: rgba(16, 51, 35, 0.5); }
.tesi-dialog h3 { margin: 0 0 0.75rem; color: var(--BPrincipal_Dark); font-size: 1.2rem; }
.tesi-dialog p { margin: 0 0 0.9rem; }
.tesi-dialog__hint { color: var(--Gris-500); font-size: 0.85rem; }
.tesi-dialog a { color: var(--BSecundario); font-weight: 600; }
.tesi-dialog form { display: flex; justify-content: flex-end; margin-top: 1.25rem; }

.tesi-swal { font-family: var(--font-sans) !important; border-radius: 0.75rem !important; }

@media (max-width: 900px) {
    .tesi-auth__shell { grid-template-columns: 1fr; }
    .tesi-auth__brand { display: none; }
    .tesi-auth__logo-mobile { display: block; }
    .tesi-auth__panel { align-items: start; padding-top: 3rem; }
}
@media (max-width: 480px) { .tesi-field-row { grid-template-columns: 1fr; } }

/* ==========================================================================
   Paginas de contenido heredadas (RRHH, licencias, mision...)
   Conservan su HTML (card > p / .titular); aca se les da ritmo de lectura.
   ========================================================================== */
body.tesi .titular { color: var(--BPrincipal) !important; font-family: var(--font-sans) !important; font-weight: 700 !important; }
body.tesi h1.titular, body.tesi h2.titular, body.tesi h3.titular, body.tesi h4.titular, body.tesi h5.titular { margin: 1.5rem 0 0.6rem; font-size: 1.1rem; }
body.tesi .content .card > .card-body p { max-width: 85ch; line-height: 1.75; }
body.tesi .content .card > .card-body p:last-child { margin-bottom: 0; }
body.tesi .content .card > .card-body .row.col-sm-12 { margin: 0; padding: 0; }
body.tesi .content .card > .card-body .row.col-sm-12 > [class*="col-"] { padding: 0; }
body.tesi .content a .fa-file-pdf, body.tesi .content a .fa-file-word, body.tesi .content a .fa-file-excel { color: var(--Error); }
body.tesi .content ul:not(.nav):not(.pagination):not(.dropdown-menu) { padding-left: 1.2rem; }
body.tesi .content ul:not(.nav):not(.pagination):not(.dropdown-menu) li::marker { color: var(--BAcento); }
body.tesi .content .card img:not([class]) { max-width: 100%; height: auto; border-radius: var(--radius-box); }

/* Pestañas (perfil) — subrayado en verde lima, como las tabs de v3 */
body.tesi .nav-tabs { border-bottom: 1px solid var(--Gris-200); margin-bottom: 1.25rem; gap: 0.25rem; }
body.tesi .nav-tabs .nav-link {
    margin-bottom: -1px; padding: 0.6rem 1rem;
    background: transparent !important; border: 0; border-bottom: 3px solid transparent; border-radius: 0;
    color: var(--Gris-500) !important; font-size: 0.9rem; font-weight: 600;
}
body.tesi .nav-tabs .nav-link:hover { color: var(--BPrincipal) !important; border-bottom-color: var(--Gris-200); }
body.tesi .nav-tabs .nav-link.active { color: var(--BPrincipal_Dark) !important; border-bottom-color: var(--BAcento); }
body.tesi .tab-content > .tab-pane > .card:first-child { margin-top: 0; }

/* Campos de solo lectura: se leen como dato, no como input deshabilitado */
body.tesi .form-control:disabled, body.tesi .form-control[readonly] {
    background: var(--Gris-100); border-color: var(--Gris-200); color: var(--Gris-900); opacity: 1;
}
body.tesi .card-body > h4, body.tesi .card-body > h5, body.tesi .card-body center > h4, body.tesi .card-body center > h5 { font-size: 1.05rem; margin-bottom: 1rem; }

/* Beneficios: afinado sobre sus estilos propios (filtros por dia + tarjetas) */
body.tesi .subtitle-beneficios { margin-bottom: 1.25rem; color: var(--Gris-500); font-size: 1rem; text-align: left; }
body.tesi .dias-container { justify-content: flex-start; gap: 0.5rem; margin-bottom: 1.5rem; }
body.tesi .btn-dia {
    padding: 0.4rem 1rem; border: 1px solid var(--Gris-200); border-radius: 999px;
    background: #fff; color: var(--Gris-700); font-size: 0.85rem; font-weight: 600;
}
body.tesi .btn-dia:hover { border-color: var(--BPrincipal); color: var(--BPrincipal); background: #fff; }
body.tesi .btn-dia.active { background: var(--BPrincipal); border-color: var(--BPrincipal); color: #fff; }
body.tesi .beneficios-grid { gap: 1rem; }
body.tesi .beneficio-card { border-radius: var(--radius-box); box-shadow: var(--shadow-card); transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease; }
body.tesi .beneficio-card:hover { border-color: var(--BPrincipal); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(16, 51, 35, 0.1); }
body.tesi .beneficio-titulo { font-size: 0.98rem; font-weight: 700; line-height: 1.35; }
body.tesi .btn-ver-mas { border-radius: var(--radius-field); font-weight: 600; font-size: 0.875rem; }

/* ==========================================================================
   Noticias (blog binshops): listado, busqueda y nota
   ========================================================================== */
.tesi-blog-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.tesi-search { position: relative; display: flex; align-items: center; gap: 0.5rem; flex: 1 1 320px; max-width: 520px; }
.tesi-search > i { position: absolute; left: 0.85rem; color: var(--Gris-500); font-size: 0.85rem; pointer-events: none; }
.tesi-search input {
    flex: 1; height: 2.5rem; padding: 0 0.85rem 0 2.3rem;
    background: #fff; border: 1px solid #d5d9e2; border-radius: var(--radius-field);
    color: var(--Gris-900); font-size: 0.9rem;
}
.tesi-search input:focus { outline: 0; border-color: var(--BPrincipal); box-shadow: 0 0 0 3px rgba(32, 92, 64, 0.15); }
body.tesi .tesi-search .btn { height: 2.5rem; }

.tesi-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.tesi-chips--foot { margin: 2rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--Gris-200); }
body.tesi .tesi-chip {
    padding: 0.35rem 0.9rem; border: 1px solid var(--Gris-200); border-radius: 999px;
    background: #fff; color: var(--Gris-700); font-size: 0.82rem; font-weight: 600; text-decoration: none;
}
body.tesi .tesi-chip:hover { border-color: var(--BPrincipal); color: var(--BPrincipal); }
body.tesi .tesi-chip.is-active { background: var(--BPrincipal); border-color: var(--BPrincipal); color: #fff; }

.tesi-news__excerpt { margin: 0; color: var(--Gris-500); font-size: 0.85rem; line-height: 1.55; }
.tesi-pagination { display: flex; justify-content: center; margin-top: 2rem; }
.tesi-pagination nav > div:first-child { display: none; }
body.tesi .tesi-pagination .pagination { margin: 0; }

.tesi-article-wrap { max-width: 52rem; margin: 0 auto; }
body.tesi .tesi-back { display: inline-flex; align-items: center; gap: 0.4rem; margin-bottom: 1rem; color: var(--Gris-500); font-size: 0.85rem; font-weight: 600; text-decoration: none; }
body.tesi .tesi-back:hover { color: var(--BPrincipal); }
.tesi-article__cover { display: block; width: 100%; max-height: 420px; object-fit: cover; }
.tesi-article__body { padding: 2rem 2.25rem 2.25rem; }
.tesi-article__meta { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; color: var(--Gris-500); font-size: 0.82rem; font-weight: 500; }
body.tesi .tesi-article__title { margin: 0 0 0.75rem; color: var(--BPrincipal_Dark); font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.2; text-transform: none; }
.tesi-article__lead { margin: 0 0 1.5rem; color: var(--Gris-500); font-size: 1.08rem; line-height: 1.6; }
.tesi-article__content { color: var(--Gris-700); font-size: 1rem; line-height: 1.8; overflow-wrap: anywhere; }
.tesi-article__content img { max-width: 100%; height: auto; border-radius: var(--radius-box); }
.tesi-article__content h2, .tesi-article__content h3 { margin: 1.75rem 0 0.6rem; font-size: 1.2rem; }
.tesi-article__content blockquote { margin: 1.5rem 0; padding: 0.25rem 0 0.25rem 1.1rem; border-left: 3px solid var(--BAcento); color: var(--Gris-500); }
@media (max-width: 575px) { .tesi-article__body { padding: 1.25rem; } }

/* ==========================================================================
   Panel de noticias (binshopsblog_admin) dentro del shell
   ========================================================================== */
.tesi-subnav { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--Gris-200); }
body.tesi .tesi-subnav__item {
    display: inline-flex; align-items: center; gap: 0.45rem;
    margin-bottom: -1px; padding: 0.6rem 0.9rem;
    border-bottom: 3px solid transparent;
    color: var(--Gris-500); font-size: 0.875rem; font-weight: 600; text-decoration: none;
}
body.tesi .tesi-subnav__item:hover { color: var(--BPrincipal); border-bottom-color: var(--Gris-200); }
body.tesi .tesi-subnav__item.is-active { color: var(--BPrincipal_Dark); border-bottom-color: var(--BAcento); }
.tesi-subnav__item--end { margin-left: auto; }
body.tesi .tesi-blogadmin .card { margin: 0 0 1rem !important; }
body.tesi .tesi-blogadmin .card-title a, body.tesi .tesi-blogadmin .a-link-cart-color { color: var(--Gris-900) !important; font-weight: 700; text-decoration: none; }
body.tesi .tesi-blogadmin .card-title { float: none; font-size: 1.05rem; margin-bottom: 0.5rem; }
body.tesi .tesi-blogadmin h5 { font-size: 1.05rem; margin-bottom: 1rem; }
body.tesi .tesi-blogadmin dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: 0.75rem 0 1rem; font-size: 0.875rem; }
body.tesi .tesi-blogadmin dt { color: var(--Gris-500); font-weight: 600; }
body.tesi .tesi-blogadmin dd { margin: 0; color: var(--Gris-900); }
body.tesi .tesi-blogadmin .search-form-outer form { display: flex; gap: 0.5rem; max-width: 520px; text-align: left !important; }
body.tesi .tesi-blogadmin .search-form-outer input[type=text] { flex: 1; width: auto !important; }
body.tesi .tesi-blogadmin .search-form-outer .btn { margin: 0 !important; }
body.tesi .tesi-blogadmin .ck-editor__editable { min-height: 320px; }
body.tesi .tesi-blogadmin .ck.ck-editor { font-family: var(--font-sans); }
body.tesi .tesi-blogadmin .bg-white, body.tesi .tesi-blogadmin .bg-light { border: 1px solid var(--Gris-200); border-radius: var(--radius-box); }

/* ==========================================================================
   Paginas de error (resources/views/errors)
   ========================================================================== */
.tesi-error__shell {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    min-height: 100vh; padding: 2rem 1.5rem; text-align: center;
    background: radial-gradient(60% 45% at 50% 0%, var(--Bg_header), transparent 70%);
}
.tesi-error__logo { width: 170px; margin-bottom: 2.5rem; }
.tesi-error__code { color: var(--BAcento); font-size: 0.85rem; font-weight: 700; letter-spacing: 0.2em; }
.tesi-error__shell h1 { margin: 0.4rem 0 0.75rem; color: var(--BPrincipal_Dark); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; letter-spacing: -0.01em; }
.tesi-error__shell p { max-width: 46ch; margin: 0 0 1.75rem; color: var(--Gris-500); font-size: 1rem; }
.tesi-error__actions a { text-decoration: none; }

/* SweetAlert2 dentro del shell (plugin de AdminLTE) */
body.tesi .swal2-popup { font-family: var(--font-sans); border-radius: 0.75rem; }
body.tesi .swal2-title { color: var(--Gris-900); font-size: 1.3rem; }
body.tesi .swal2-styled.swal2-confirm { background-color: var(--BPrincipal) !important; border-radius: var(--radius-field); box-shadow: none !important; }
body.tesi .swal2-styled.swal2-cancel, body.tesi .swal2-styled.swal2-deny { border-radius: var(--radius-field); }

/* Bootstrap fija "Browse" con :lang(en), que gana por especificidad */
body.tesi .custom-file-input:lang(en) ~ .custom-file-label::after,
body.tesi .custom-file-input:lang(es) ~ .custom-file-label::after { content: 'Examinar'; }

/* ==========================================================================
   Celular: mas aire para el contenido y tablas compactas
   ========================================================================== */
body.tesi .tesi-col-accion { width: 1%; white-space: nowrap; text-align: center; }
body.tesi td:last-child > a > .btn-sm { margin: 0; }
@media (max-width: 575px) {
    body.tesi .content { padding: 1.1rem 0.75rem 2.5rem; }
    body.tesi .card-body { padding: 0.9rem 0.75rem; }
    .tesi-page-header__inner { padding: 1.1rem 1rem 0.8rem; }
    .tesi-page-header__title { font-size: 1.35rem; }
    .tesi-page-subtitle { padding: 1rem 1rem 0; font-size: 0.92rem; }

    body.tesi .table { font-size: 0.82rem; }
    body.tesi .table thead th { padding: 0.55rem 0.4rem; font-size: 0.68rem; letter-spacing: 0.03em; }
    body.tesi .table td { padding: 0.55rem 0.4rem; }
    /* DataTables reserva 30px a la derecha de cada encabezado para las flechas de orden */
    body.tesi table.dataTable thead > tr > th.sorting,
    body.tesi table.dataTable thead > tr > th.sorting_asc,
    body.tesi table.dataTable thead > tr > th.sorting_desc { padding-right: 1.15rem; }
    body.tesi table.dataTable thead > tr > th.sorting::before, body.tesi table.dataTable thead > tr > th.sorting::after,
    body.tesi table.dataTable thead > tr > th.sorting_asc::before, body.tesi table.dataTable thead > tr > th.sorting_asc::after,
    body.tesi table.dataTable thead > tr > th.sorting_desc::before, body.tesi table.dataTable thead > tr > th.sorting_desc::after { right: 0.3rem; font-size: 0.7rem; }

    body.tesi .dataTables_wrapper .dataTables_length, body.tesi .dataTables_wrapper .dataTables_filter { text-align: left; }
    body.tesi .dataTables_wrapper .dataTables_filter input { width: 100%; margin: 0.25rem 0 0; }
    body.tesi .dataTables_wrapper .dataTables_filter label { width: 100%; }
    body.tesi .dataTables_wrapper .dataTables_info { padding-bottom: 0.5rem; white-space: normal; }
    body.tesi .dataTables_wrapper .pagination { flex-wrap: wrap; justify-content: center; }
}

/* DataTables pinta de gris las columnas por las que se ordena (clase display): sin ese sombreado */
body.tesi table.dataTable.display tbody tr > .sorting_1,
body.tesi table.dataTable.display tbody tr > .sorting_2,
body.tesi table.dataTable.display tbody tr > .sorting_3,
body.tesi table.dataTable.display tbody tr.odd > td,
body.tesi table.dataTable.display tbody tr.even > td { background: transparent !important; box-shadow: none !important; }
body.tesi table.dataTable.display tbody tr:hover > td { background: rgba(32, 92, 64, 0.04) !important; }
body.tesi table.dataTable.no-footer, body.tesi table.dataTable thead th, body.tesi table.dataTable thead td { border-bottom-color: var(--Gris-200); }
@media (max-width: 767px) {
    body.tesi div.dataTables_wrapper div.dataTables_length, body.tesi div.dataTables_wrapper div.dataTables_filter { text-align: left; }
    body.tesi div.dataTables_wrapper div.dataTables_filter label { display: block; }
    body.tesi div.dataTables_wrapper div.dataTables_filter input { display: block; width: 100%; margin: 0.25rem 0 0.5rem; }
    body.tesi div.dataTables_wrapper div.dataTables_info, body.tesi div.dataTables_wrapper div.dataTables_paginate { text-align: center; }
}
/* DataTables 1.13 hace el rayado / columna ordenada con box-shadow inset (no con background) */
body.tesi table.dataTable > tbody > tr > * { box-shadow: none !important; }
body.tesi table.dataTable > tbody > tr:hover > * { box-shadow: inset 0 0 0 9999px rgba(32, 92, 64, 0.04) !important; }

/* Convivencia con la version anterior (la app servida desde /v3): links de vuelta */
body.tesi .tesi-volver { color: var(--Gris-500); font-weight: 600; text-decoration: none; }
body.tesi .tesi-volver:hover { color: var(--BPrincipal); }
body.tesi .tesi-volver i { font-size: 0.7rem; margin-right: 0.25rem; }
.tesi-auth__volver { margin: 1.25rem 0 0; color: var(--Gris-500); font-size: 0.82rem; text-align: center; }
.tesi-auth__volver a { color: var(--BSecundario); font-weight: 600; text-decoration: none; }
.tesi-auth__volver a:hover { text-decoration: underline; }
@media (max-width: 575px) { body.tesi .tesi-volver { float: none !important; display: block; margin-bottom: 0.4rem; } }
