/* ===============================
   VARIABLES GLOBALES
   =============================== */

/* Required field indicator */
.form-label.required::after {
  content: " *";
  color: #d63939;
  font-weight: bold;
}

:root {
    --brand-primary: #023047;
    --brand-secondary: #f59e0b;
    --brand-accent: #38bdf8;

    --brand-sidebar-bg: #023047;
    /*--brand-sidebar-text: rgba(255, 255, 255, 0.75);*/
    --brand-sidebar-text:var(--brand-sidebar-text);
    --brand-sidebar-text-hover:var(--brand-sidebar-text)-hover;

    --tblr-primary: var(--brand-primary);
    --tblr-primary-rgb: 2, 48, 71;

    --tblr-navbar-bg: var(--brand-primary);
    --tblr-active-color: var(--brand-secondary);

    --tblr-sidebar-width: 240px;
    --tblr-sidebar-collapsed-width: 72px;
}

/* ===============================
   LAYOUT BASE
   =============================== */

.page {
    display: flex !important;
    background-color: #FAFAF7 !important;
}

.page-wrapper {
    margin-left: 0 !important;
    transition: margin-left 0.2s ease;
}

/* ===============================
   SIDEBAR BASE
   =============================== */

.navbar.navbar-vertical {
    width: var(--tblr-sidebar-width);
    height: 100vh;
    background-color: var(--brand-sidebar-bg);
    display: flex;
    flex-direction: column;
}

.navbar.navbar-vertical > .container-fluid {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: flex-start;
}

/* ===============================
   SIDEBAR · LINKS
   =============================== */

.navbar-vertical .nav-link {
    display: flex;
    align-items: center;
    padding: 0.65rem 1rem;
    color: var(--brand-sidebar-text);
    background: transparent !important;
    transition: color 0.15s ease;
}

.navbar-vertical .nav-link i {
    width: 1.5rem;
    margin-right: 0.5rem;
    text-align: center;
}

.navbar-vertical .nav-link span {
    white-space: nowrap;
}

.navbar-vertical .nav-link:hover,
.navbar-vertical .nav-link.active {
    color: var(--brand-sidebar-text-hover);
}

.navbar-vertical .nav-link.active {
    font-weight: 500;
    background-color: var(--brand-secondary) !important;
    border-radius: 6px;
    margin: 2px 8px;
    padding-left: 12px;
}

/* ===============================
   SIDEBAR · LOGO
   =============================== */

.sidebar-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

.sidebar-logo-full {
    display: block;
    max-width: 120px;
    max-height: 38px;
    width: auto;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

.sidebar-logo-collapsed {
    display: none;
}

/* ===============================
   SIDEBAR · ACCOUNT / AVATAR
   =============================== */

.sidebar-account {
    display: flex;
    justify-content: center;
}

.sidebar-account-btn {
    width: 100%;
    display: flex;
    align-items: center;
    text-align: left;
}

.sidebar-account-btn:hover {
    background-color: var(--brand-sidebar-bg) !important;
}

.sidebar-user-name {
    color: var(--brand-sidebar-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-account img {
    object-fit: cover;
}

.sidebar-account-btn:hover .sidebar-user-name,
.sidebar-account-btn:hover i {
    color: var(--brand-sidebar-text-hover);
    background-color: transparent !important;
}

.btn-link:hover {
    background-color: transparent;
    text-decoration: none;
}

/* ===============================
   SIDEBAR · LANGUAGE SWITCHER
   =============================== */

.sidebar-language-switcher {
    width: 100%;
    padding-bottom: 12vh;
}

.language-select-wrapper {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    background-color: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
}

.language-select-wrapper:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.language-icon {
    margin-right: 8px;
    color: rgba(255, 255, 255, 0.7);
}

.language-select {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
}

/* ===============================
   SIDEBAR · TOGGLE
   =============================== */

.sidebar-toggle-container {
    font-weight: bolder ;
    position: absolute;
    bottom: 5%;
    width: 100%;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.sidebar-toggle-btn {
    pointer-events: all;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--brand-sidebar-bg);
    background-color: #F3F2EC;
    color: var(--brand-sidebar-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
}

/* ===============================
   SIDEBAR · COLAPSADA
   =============================== */

body.navbar-vertical-collapsed {
    --tblr-sidebar-width: var(--tblr-sidebar-collapsed-width);
}

body.navbar-vertical-collapsed .navbar-vertical {
    width: var(--tblr-sidebar-collapsed-width);
}

body.navbar-vertical-collapsed .page-wrapper {
    margin-left: var(--tblr-sidebar-collapsed-width);
}

body.navbar-vertical-collapsed .navbar-vertical .nav-link {
    justify-content: center;
    padding: 0.6rem 0;
}

body.navbar-vertical-collapsed .navbar-vertical .nav-link span {
    display: none;
}

body.navbar-vertical-collapsed .navbar-vertical .nav-link i {
    margin-right: 0;
    font-size: 1.2rem;
}

body.navbar-vertical-collapsed .sidebar-logo {
    justify-content: center;
}

body.navbar-vertical-collapsed .sidebar-logo-full {
    display: none;
}

body.navbar-vertical-collapsed .sidebar-logo-collapsed {
    display: block;
    max-width: 32px;
    margin: 0 auto;
}

body.navbar-vertical-collapsed .sidebar-account-btn {
    justify-content: center;
    padding: 0.5rem 0;
}

body.navbar-vertical-collapsed .sidebar-user-name {
    display: none;
}

body.navbar-vertical-collapsed .sidebar-language-switcher {
    display: none;
}

/* ===============================
   DARK THEME · LOGO BLANCO
   =============================== */

[data-bs-theme="dark"] .sidebar-logo img {
    filter: brightness(0) invert(1);
}

/* ===============================
   SIDEBAR · ESTADO EXPANDIDO (FIX)
   =============================== */

.navbar-vertical .nav-link {
    justify-content: flex-start;
    padding-left: 1rem;
}

.navbar-vertical .nav-link i {
    margin-right: 0.6rem;
}

.sidebar-account {
    justify-content: flex-start;
}

.sidebar-account-btn {
    justify-content: flex-start;
    padding: 0.65rem 1rem;
}

.sidebar-account-btn img,
.sidebar-account-btn i {
    margin-right: 0.6rem;
}

/* ===============================
   SIDEBAR · EXPANDIDA (ALINEACIÓN)
   =============================== */

body:not(.navbar-vertical-collapsed) .navbar-vertical .nav-link {
    justify-content: flex-start;
    text-align: left;
    padding-left: 1rem;
}

body:not(.navbar-vertical-collapsed) .navbar-vertical .nav-link i {
    margin-right: 0.6rem;
}

/* ===============================
   LAYOUT TABLER CORRECTO
   =============================== */

.page {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
}

.card {
    background-color: #F3F2EC;
}
.card-footer {
    background-color: #F3F2EC ;
}
    /* ===============================
       PHASE CARDS · DEPTH & HOVER
       =============================== */

.phase-card {
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background-color: #F3F2EC;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease,
    box-shadow 0.25s ease,
    background-color 0.25s ease,
    border-color 0.25s ease;
}

.phase-card:hover {
    background-color: rgba(var(--brand-primary-rgb), 0.08);
    border-color: var(--brand-primary);
    transform: translateY(-6px);
    box-shadow: 0 10px 24px rgba(32, 107, 196, 0.18),
    0 2px 6px rgba(0, 0, 0, 0.08);
}

.phase-card .card-title {
    font-weight: 600;
}

.phase-card:hover .card-title {
    color: var(--brand-primary);
}

/* ===============================
   CLICKABLE CARD LINK
   =============================== */

.phase-card-link {
    text-decoration: none;
    color: inherit;
}

/* ===============================
   OPTIONAL · BUTTON MICRO-ANIMATION
   =============================== */

.phase-card .btn {
    transition: transform 0.2s ease;
}

.phase-card:hover .btn {
    transform: translateX(2px);
}

/* ===============================
   ADMIN MENU FIX
   =============================== */

.admin-toggle {
    padding-right: 1rem;
    display: flex;
    align-items: center;
}

.admin-chevron {
    width: 16px;
    min-width: 16px;
    transition: transform 0.2s ease;
}

.admin-toggle[aria-expanded="true"] .admin-chevron {
    transform: rotate(180deg);
}

body.navbar-vertical-collapsed .admin-toggle span span,
body.navbar-vertical-collapsed .admin-chevron {
    display: none;
}

body.navbar-vertical-collapsed #adminMenu {
    display: none !important;
}

/* ===============================
   ADMIN · VISIBILIDAD SEGÚN ESTADO
   =============================== */

.admin-collapsed {
    display: none;
}

body.navbar-vertical-collapsed .admin-expanded {
    display: none;
}

body.navbar-vertical-collapsed .admin-collapsed {
    display: flex;
}

/* ===============================
   Tom Select + Tabler
   Dropdown fondo blanco
   =============================== */

.ts-dropdown {
    background-color: #ffffff;
    border: 1px solid var(--tblr-border-color, #d9dbde);
    border-radius: var(--tblr-border-radius, 4px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    z-index: 1055; /* por encima de cards, modals, etc */
}

.ts-dropdown .ts-dropdown-content {
    background-color: #ffffff;
}

.ts-dropdown .option {
    background-color: #ffffff;
    color: var(--tblr-body-color, #1f2937);
}

.ts-dropdown .option.active,
.ts-dropdown .option:hover {
    background-color: rgba(var(--tblr-primary-rgb), 0.08);
    color: var(--tblr-body-color, #1f2937);
}

.ts-control {
    min-height: calc(1.5em + .75rem + 5px);
    padding: .375rem .75rem;
}

[data-bs-theme="dark"] .ts-dropdown,
[data-bs-theme="dark"] .ts-dropdown .ts-dropdown-content,
[data-bs-theme="dark"] .ts-dropdown .option {
    background-color: #1f2937;
    color: #f3f4f6;
}

[data-bs-theme="dark"] .ts-dropdown .option.active,
[data-bs-theme="dark"] .ts-dropdown .option:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/* ===============================
   Tom Select · Focus igual que Tabler
   =============================== */

.ts-control {
    background-color: #ffffff;
    border: 1px solid var(--tblr-border-color, #d9dbde);
    border-radius: var(--tblr-border-radius, 4px);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.ts-control.focus {
    border-color: var(--tblr-primary);
    box-shadow: 0 0 0 .25rem rgba(var(--tblr-primary-rgb), .25);
}

[data-bs-theme="dark"] .ts-control {
    background-color: #1f2937;
    border-color: #374151;
    color: #f3f4f6;
}

[data-bs-theme="dark"] .ts-control.focus {
    border-color: var(--tblr-primary);
    box-shadow: 0 0 0 .25rem rgba(var(--tblr-primary-rgb), .4);
}

/* ===============================
   Tom Select · Focus EXACTO como Tabler
   (override definitivo)
   =============================== */

.ts-wrapper.focus .ts-control {
    border-color: var(--tblr-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(var(--tblr-primary-rgb), 0.25) !important;
}

/* Asegurar que no haya overlays más claros */
.ts-wrapper.focus {
    outline: none !important;
}

.sidebar-footer {
    font-size: 0.75rem;
    line-height: 1.2;
    color: lightgrey !important;
}

.sidebar-manual-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.15s;
}

.sidebar-manual-link:hover {
    color: #fff;
}

.navbar-vertical-collapsed .sidebar-manual-text {
    display: none;
}

.accordion-button::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--tblr-primary);
    opacity: 0.4;
}

.accordion-button.collapsed::before {
    opacity: 0.2;
}

/* Header del acordeón "Datos de la acción" con el mismo look&feel que
   las cabeceras de las cards (.card-header > .card-title): mismo fondo
   blanco que las cabeceras de Notes/Owners/Status en este tema (Bootstrap
   tiñe el botón expandido de azul claro, lo neutralizamos) y la misma
   tipografía que el título de card. */
#changeActionAccordion .accordion-button,
#changeActionAccordion .accordion-button:not(.collapsed) {
    --tblr-accordion-active-bg: #fff;
    --tblr-accordion-btn-bg: #fff;
    --bs-accordion-active-bg: #fff;
    --bs-accordion-btn-bg: #fff;
    background-color: #fff !important;
    box-shadow: none;
    color: var(--tblr-body-color, inherit);
}

#changeActionAccordion .accordion-button:focus {
    box-shadow: none;
}

#changeActionAccordion .accordion-button > span {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}


mark {
    background-color: rgba(255, 193, 7, 0.35);
    padding: 0 2px;
    border-radius: 2px;
}

.facet-values-box {
    border: 1px solid rgba(98, 105, 118, 0.2);
    border-radius: 6px;
    padding: 0.75rem;
    background-color: var(--tblr-bg-surface, #fff);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.facet-value-row {
    display: flex;
    align-items: center;
}

.facet-value-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-left: 0.5rem;
}

.facet-value-text {
    flex: 1;
}

.facet-value-count {
    min-width: 2rem;
    text-align: right;
    color: #6c757d; /* text-muted */
    font-size: 0.85em;
}

.search-preview {
    max-height: 100px;
    overflow: hidden;
    position: relative;
    line-height: 1.5;
    transition: max-height 0.3s ease;
}

/* Estado expandido */
.search-preview[data-expanded=”true”] {
    max-height: 2000px;
    overflow: auto;
}

/* Degradado solo cuando está colapsado */
.search-preview[data-expanded="false"]::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(
            rgba(255, 255, 255, 0),
            rgba(255, 255, 255, 1)
    );
}

.search-doc-title {
    color: var(--brand-primary)
}

.card-link-pop {
    color: var(--brand-primary);
    transition: transform .15s ease, box-shadow .15s ease;
}

.card-link-pop:hover {
    color: var(--brand-accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

.card-link-wrapper {
    text-decoration: none;
    color: inherit;
}

.card-link-wrapper:hover {
    text-decoration: none;
    color: inherit;
}

.hidden_button {
    border-style: none;
    background-color: transparent;
}

.collapse {
    transition: all .25s ease;
}

a[data-bs-toggle="collapse"]:hover {
    color: var(--tblr-primary);
}

.layout {
    display: flex;
    align-items: flex-start; /* MUY importante */
}

.sidebar {
    position: sticky;
    top: 0rem; /* referencia obligatoria */
    width: 280px;
    height: fit-content;
}

.content {
    flex: 1;
}

.card-doc-title {
    color: var(--brand-primary);
}

.sidebar-notifications-toggle {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    color: #cbd5e1 !important; /* gris claro */
    text-decoration: none;

    position: relative;
}

.sidebar-notifications-toggle i {
    font-size: 20px;
    line-height: 1;
}

.sidebar-notifications-toggle:hover {
    color: #ffffff !important;
}

/* Badge rojo */
.sidebar-notifications-badge {
    position: absolute;
    top: 8px;
    right: 8px;

    width: 8px;
    height: 8px;

    background: #ef4444;
    border-radius: 50%;
}

.sidebar-notifications-badge {
    position: absolute;
    top: 6px;
    right: 6px;

    width: 8px;
    height: 8px;

    background-color: #ef4444;
    border-radius: 50%;
}

/* ===== Notifications panel (Tabler white) ===== */

.notifications-panel {
    position: fixed;
    top: 72px;
    left: 260px;
/ / ancho sidebar width: 360 px;
    max-height: 70vh;

    background: #ffffff;
    border: 1px solid #e6e7e9;
    border-radius: 6px;

    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    z-index: 2000;

    display: flex;
    flex-direction: column;
}

.notifications-header {
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1f2937;

    border-bottom: 1px solid #e6e7e9;
    background: #f8fafc;

    display: flex;
    align-items: center;
}

.notifications-body {
    overflow-y: auto;
    padding: 0.5rem 0;
}

/* ===== Notification item ===== */

.notification-item {
    padding: 0.75rem 1rem;
    cursor: pointer;

    border-bottom: 1px solid #f1f3f5;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: #f8fafc;
}

/* Unread highlight */
.notification-unread {
    background: #f1f5f9;
}

.notification-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #111827;
}

.notification-message {
    font-size: 0.8rem;
    color: #4b5563;
    margin-top: 0.25rem;
    line-height: 1.4;
}

.notification-time {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
}

/* ===== Empty ===== */

.notification-empty {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.8rem;
    color: #9ca3af;
}

.notification-unread {
    background: #f1f5f9;
}

.sidebar-avatar-wrapper {
    position: relative;
    width: 45px;
    height: 45px;
}

.sidebar-avatar {
    width: 45px;
    height: 45px;
    object-fit: cover;
}

.sidebar-avatar-icon {
    font-size: 45px;
    color: white;
}

.sidebar-notification-bell {
    position: absolute;
    bottom: -17px; /* ⬇️ más abajo */
    left: -6px; /* ⬅️ menos encima */
    background: var(--brand-sidebar-bg);
    border-radius: 50%;
    padding: 5px;
    font-size: 17px;
    color: white;
    line-height: 1;
}

.sidebar-notifications-badge {
    position: absolute;
    top: -3px;
    right: 8px;
    width: 15px;
    height: 15px;
    background: red;
    border-radius: 50%;
}

.not_hover {
    color: white !important;
}

.not_hover:hover {
    color: orange !important;
}

.btn-left {
    text-align: left !important;
}

.card-link-wrapper {
    all: unset;
    cursor: pointer;
    display: block;
    width: 100%;
}

/* Contenedor principal de Quill */
#observaciones-action-editor .ql-container {
    min-height: 200px !important;
}

/* Área editable */
#observaciones-action-editor .ql-editor {
    min-height: 200px !important;
}

.ql-container {
    box-sizing: border-box;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 13px;
    min-height: 200px;
    margin: 0px;
    position: relative;
    background-color: #fff;
}

.ql-toolbar {
    background-color: #fff;
}

/* Esquinas redondeadas para el editor de notas (Quill snow).
   La toolbar es el hermano previo del contenedor: redondeamos su
   borde superior y el inferior del contenedor + área editable para
   que el fondo blanco respete la curva. */
.ql-toolbar.ql-snow:has(+ #observaciones-action-editor) {
    border-top-left-radius: .5rem;
    border-top-right-radius: .5rem;
}

#observaciones-action-editor.ql-container,
#observaciones-action-editor .ql-editor {
    border-bottom-left-radius: .5rem;
    border-bottom-right-radius: .5rem;
}

.quill-fullscreen {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 1055;
    background: #fff;
    padding: 1rem;
}

.quill-fullscreen .ql-container {
    height: calc(100vh - 80px) !important;
}

.quill-fullscreen .ql-toolbar {
    position: sticky;
    top: 0;
    z-index: 1060;
}

.ql-toolbar .ql-fullscreen {
    font-size: 18px;
    padding: 5px 8px;
    cursor: pointer;
}

.ql-toolbar .ql-fullscreen:hover {
    background: #e5e7eb;
}

/* Galería de producto – controles visibles */
.gallery-control {
    width: 48px;
    height: 48px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 1;
}

.gallery-control .carousel-control-prev-icon,
.gallery-control .carousel-control-next-icon {
    background-size: 70% 70%;
    background-color: rgba(0, 0, 0, 0.45);
    border-radius: 50%;
    padding: 12px;
}

.gallery-control:hover .carousel-control-prev-icon,
.gallery-control:hover .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.65);
}

.modal-dialog-scrollable .modal-content {
    min-height: 75vh;
}

/* Modal con altura fija y scroll interno (Bootstrap / Tabler) */
.modal-dialog-scrollable .modal-body {
    overflow-y: auto;
}

.badge-wide {
    min-width: 90px;
    text-align: center;
    display: inline-block;
}

.sec-analisis {
    width: 100%;
    height: 100vh;
}

/* ===== Columna de instrucciones ===== */
.instructions-column {
    position: sticky;
    top: 1rem;
    height: calc(80vh - 120px);
    overflow-y: auto;
}

/* Card ocupa todo */
.instructions-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Scroll interno REAL */
.instructions-body {
    flex: 1;
    overflow-y: auto;
}
.btn-sm:hover {
    background-color: var(--brand-secondary);
}

 .img-circle-kpi {
     width: 100%;
     height: 75px;
     border-radius: 0% 0% 0% 0%;
     object-fit: cover;
     display: inline-flex;
     align-items: center;
     justify-content: center;
 }
.chevron {
    transition: transform 0.3s ease;
}

.accordion-button:not(.collapsed) .chevron {
    transform: rotate(180deg);
}
/* ============================= */
/* CATALOG VISUAL TABS PREMIUM  */
/* ============================= */

.catalog-tab-card {
    position: relative;
    height: 150px;                 /* ↓ menos alto */
    border-radius: 8px;           /* ↓ menos redondeado */
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.catalog-tab-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

/* Fondo imagen */
.catalog-tab-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

/* Oscurecer cuando NO está activa */
.catalog-tab-card:not(.active) .catalog-tab-bg {
    filter: brightness(0.55);
}

/* Activa más luminosa */
.catalog-tab-card.active .catalog-tab-bg {
    filter: brightness(0.85);
}

/* Hover ligero zoom */
.catalog-tab-card:hover .catalog-tab-bg {
    transform: scale(1.03);
}

/* Overlay */
.catalog-tab-overlay {
    position: absolute;
    inset: 0;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: white;

    background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.6) 20%,
            rgba(0, 0, 0, 0.3) 60%,
            rgba(0, 0, 0, 0.05) 100%
    );
}

.catalog-tab-overlay h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.catalog-tab-overlay p {
    margin: 4px 0 0 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Hover suave */
.catalog-tab-card:hover {
    transform: translateY(-3px);
}

/* 🔶 ACTIVO — NARANJA FUERTE */
.catalog-tab-card.active {
    border: 3px solid #feb62c; /* naranja fuerte */
    box-shadow: 0 0 0 4px rgba(255, 166, 0, 0.25);
}

/* Fondo imagen */
.catalog-tab-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

/* No activo más oscuro */
.catalog-tab-card:not(.active) .catalog-tab-bg {
    filter: brightness(0.45);
}

/* Activo más claro */
.catalog-tab-card.active .catalog-tab-bg {
    filter: brightness(0.95);
}

/* Zoom suave */
.catalog-tab-card:hover .catalog-tab-bg {
    transform: scale(1.03);
}
/* ============================= */
/* Aletheia Marketplace Header   */
/* ============================= */

.aletheia-header {
    padding-top: 10px;
}

.marketplace-subtitle {
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #777;
    font-weight: 500;
}

.marketplace-title {
    font-size: 2rem;
    font-weight: 600;
    margin: 6px 0 0 0;
    color: #111;
}

.marketplace-divider {
    height: 1px;
    background: linear-gradient(
            to right,
            transparent,
            #ddd,
            transparent
    );
}
.search-context-link:hover {
    color: var(--brand-secondary) !important;
}

.aletheia-logo {
    height: 34px;
    width: auto;
    max-height: 34px;
    object-fit: contain;
}

/* ===================================================================
   SIDEBAR · REDISEÑO FLOTANTE ("wow")
   Todo se deriva de las variables de marca (--brand-sidebar-bg /
   --brand-sidebar-text) con color-mix, así funciona con cualquier
   paleta de cliente. Degradado, glow, panel flotante, píldora activa
   y microinteracciones.
   =================================================================== */

.navbar.navbar-vertical {
    /* Panel flotante despegado del borde. */
    margin: 12px 0 12px 12px;
    height: calc(100vh - 24px);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.26),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;                 /* clip glow + esquinas */
    /* Sticky: el sidebar mantiene su posición aunque la página haga scroll.
       `align-self: flex-start` evita que el flex-item se estire a la altura
       total del contenido (rompería el sticky). */
    position: sticky;
    top: 12px;
    align-self: flex-start;
    /* Toque glass: desenfoca lo que quede detrás en los bordes. */
    backdrop-filter: blur(10px) saturate(1.1);
    -webkit-backdrop-filter: blur(10px) saturate(1.1);
}

/* Degradado de marca (claro arriba → oscuro abajo). Solo si el
   navegador soporta color-mix; si no, se queda el color plano base. */
/* Degradado de marca + glow, como CAPAS DE FONDO (sin pseudo-elemento ni
   z-index → no interfiere con la clicabilidad del toggle). */
@supports (background: color-mix(in srgb, red, blue)) {
    .navbar.navbar-vertical {
        --sb: var(--brand-sidebar-bg);
        --sb-light: color-mix(in srgb, var(--sb) 80%, white);
        --sb-dark:  color-mix(in srgb, var(--sb) 84%, black);
        background-image:
            radial-gradient(220px 200px at 34px 24px,
                color-mix(in srgb, var(--brand-sidebar-text) 34%, transparent),
                transparent 68%),
            linear-gradient(180deg,
                var(--sb-light) 0%, var(--sb) 50%, var(--sb-dark) 100%);
    }
}

/* Scroll interno propio del contenido (sin z-index, para no tapar el toggle). */
.navbar.navbar-vertical > .container-fluid {
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
}

/* Enlaces como chips redondeados con microinteracción al pasar. */
.navbar-vertical .nav-link {
    margin: 3px 10px;
    border-radius: 12px;
    padding: 0.58rem 0.8rem;
    position: relative;
    z-index: 1;                       /* por encima del indicador deslizante */
    transition: color 0.18s ease;
}

/* Ítem activo: tipografía, color de icono y barra de acento. El fondo
   (resaltado) lo pone el INDICADOR DESLIZANTE, que descansa sobre el
   activo y sigue al ratón. */
/* `body ...` sube la especificidad (0,3,1) para ganar a la regla roja
   `--brand-secondary !important` que existe DUPLICADA en application.css y
   branding.css (misma especificidad 0,3,0), independientemente del orden de
   carga. El resaltado del activo lo pone el indicador deslizante (neutro). */
body .navbar-vertical .nav-link.active {
    font-weight: 500;
    border-radius: 12px !important;
    margin: 3px 10px !important;
    padding-left: 0.9rem !important;
    background: transparent !important;
}
@supports (background: color-mix(in srgb, red, blue)) {
    .navbar-vertical .nav-link.active i {
        color: var(--brand-sidebar-text);
    }
}
.navbar-vertical .nav-link.active::before {
    content: "";
    position: absolute;
    left: 3px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 3px;
    background: var(--brand-sidebar-text);
    box-shadow: 0 0 10px var(--brand-sidebar-text);
}

/* ---- INDICADOR DESLIZANTE ---- */
.navbar-vertical .navbar-nav {
    position: relative;              /* contenedor de referencia del slider */
}
.sidebar-nav-slider {
    position: absolute;
    z-index: 0;                      /* detrás del texto/iconos de los links */
    pointer-events: none;
    border-radius: 12px;
    opacity: 0;
    /* Resaltado NEUTRO (blanco translúcido): limpio sobre cualquier color de
       sidebar. El toque de marca lo da la barra de acento del ítem activo. */
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    transition: top 0.28s cubic-bezier(0.4, 0, 0.2, 1),
                left 0.22s ease, width 0.22s ease,
                height 0.22s ease, opacity 0.18s ease;
}

/* La cuenta como tarjeta translúcida. */
.sidebar-account-btn {
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    padding: 0.5rem 0.6rem !important;
    transition: background 0.18s ease;
}
.sidebar-account-btn:hover {
    background: rgba(255, 255, 255, 0.13) !important;
}

/* Colapsado: mantiene el look flotante, más estrecho. */
body.navbar-vertical-collapsed .navbar.navbar-vertical {
    border-radius: 16px;
}

/* Colapsado · CENTRADO. Los márgenes/padding horizontales del modo expandido
   (chips, tarjeta de cuenta, container) desplazaban todo ~18px a la derecha.
   En rail los anulamos y centramos logo, foto de cuenta e iconos. */
body.navbar-vertical-collapsed .navbar.navbar-vertical > .container-fluid {
    padding-left: 0;
    padding-right: 0;
}
body.navbar-vertical-collapsed .navbar-vertical .nav-link {
    margin-left: 0 !important;
    margin-right: 0 !important;
    justify-content: center !important;
}
body.navbar-vertical-collapsed .navbar-vertical .nav-link i {
    margin: 0 !important;
}
body.navbar-vertical-collapsed .sidebar-account-btn {
    padding-left: 0 !important;
    padding-right: 0 !important;
    justify-content: center !important;
}
body.navbar-vertical-collapsed .sidebar-avatar-wrapper {
    margin-right: 0 !important;
}
body.navbar-vertical-collapsed .sidebar-logo {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Un poco de aire entre la tarjeta "Mi cuenta" y el primer ítem del menú
   (antes el ítem activo quedaba pegado a la cuenta). */
.sidebar-account {
    margin-bottom: 12px;
}
