/* ============================================================
   SIDEBAR.CSS — Modern Sidebar Navigation for SIEC
   ============================================================ */

/* --- CSS Custom Properties (defaults, overridden by theme CSS) --- */
:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 72px;
    --sidebar-bg: #337ab7;
    --sidebar-bg-dark: #286090;
    --sidebar-bg-darker: #1a4d7a;
    --sidebar-text: #ecf0f1;
    --sidebar-text-muted: rgba(236, 240, 241, 0.55);
    --sidebar-hover-bg: rgba(255, 255, 255, 0.08);
    --sidebar-active-bg: rgba(255, 255, 255, 0.15);
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --sidebar-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --topbar-height: 60px;
    --sidebar-radius: 8px;
}

/* --- Google Font Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================================
   BASE LAYOUT
   ============================================================ */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
}

body.has-sidebar {
    padding-top: 0;
    padding-bottom: 0;
    height: 100vh;
    overflow: hidden;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    z-index: 5000;
    display: flex;
    flex-direction: column;
    transition: width var(--sidebar-transition), transform var(--sidebar-transition);
    overflow: visible;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.08);
}

/* --- Sidebar Header --- */
.sidebar-header {
    display: flex;
    align-items: center;
    padding: 20px 16px 16px;
    min-height: 80px;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--sidebar-text);
    overflow: hidden;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.sidebar-logo:hover {
    color: var(--sidebar-text);
    text-decoration: none;
}

.sidebar-logo img {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 14px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px;
}

.sidebar-logo-icon {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
}

.sidebar-logo-text {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    opacity: 1;
    transition: opacity 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-collapse-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--sidebar-text);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.sidebar-collapse-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* --- Sidebar Nav --- */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 10px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Section label */
.sidebar-section-label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sidebar-text-muted);
    padding: 16px 14px 6px;
    white-space: nowrap;
    overflow: hidden;
}

/* --- Menu Item --- */
.sidebar-item {
    margin-bottom: 2px;
}

.sidebar-link,
.sidebar .sidebar-link,
.sidebar a.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: #fff !important;
    text-decoration: none;
    border-radius: var(--sidebar-radius);
    font-size: 0.875rem;
    font-weight: 400;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.sidebar-link:hover,
.sidebar .sidebar-link:hover,
.sidebar a.sidebar-link:hover {
    background: var(--sidebar-hover-bg);
    color: #fff !important;
    text-decoration: none;
    transform: translateX(2px);
}

.sidebar-link.active,
.sidebar .sidebar-link.active {
    background: rgba(255, 255, 255, 0.18);
    color: #fff !important;
    font-weight: 600;
    border-left: 3px solid #fff;
    border-radius: 0 var(--sidebar-radius) var(--sidebar-radius) 0;
    padding-left: 11px;
}

.sidebar-link .sidebar-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    opacity: 0.85;
}

.sidebar-link:hover .sidebar-icon {
    opacity: 1;
}

.sidebar-link .sidebar-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.sidebar-link .sidebar-badge {
    background: #e74c3c;
    color: #fff;
    font-size: 0.65rem;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 600;
    flex-shrink: 0;
}

.sidebar.sidebar-initializing .sidebar-link,
.sidebar.sidebar-initializing .sidebar-link .sidebar-text,
.sidebar.sidebar-initializing .sidebar-link .sidebar-chevron,
.sidebar.sidebar-initializing .sidebar-submenu {
    transition: none !important;
}

/* --- Submenu Chevron --- */
.sidebar-link .sidebar-chevron {
    font-size: 0.65rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    opacity: 0.6;
}

.sidebar-item.open > .sidebar-link .sidebar-chevron {
    transform: rotate(90deg);
    opacity: 1;
}

/* --- Submenu Accordion --- */
.sidebar-submenu {
    list-style: none;
    padding: 0 0 0 8px;
    margin: 0 0 0 18px;
    height: 0;
    overflow: hidden;
    background-color: transparent;
    transition: height 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                padding-top 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                padding-bottom 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.2s ease;
    border-left: none;
    border-radius: var(--sidebar-radius);
}

.sidebar-item.open > .sidebar-submenu {
    padding-top: 4px;
    padding-bottom: 4px;
    border-left: none;
    background-color: rgba(255, 255, 255, 0.04);
}

.sidebar-submenu .sidebar-link {
    padding: 7px 10px 7px 16px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.78) !important;
    border-radius: var(--sidebar-radius);
}

.sidebar-submenu .sidebar-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-submenu .sidebar-link.active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 600;
    border-left: 3px solid #fff;
    border-radius: 0 var(--sidebar-radius) var(--sidebar-radius) 0;
    padding-left: 13px;
}

/* Nested submenu (level 3): sin borde extra */
.sidebar-submenu .sidebar-submenu {
    margin-left: 10px;
    border-left: none;
}

/* Nested open groups keep separation with background, not a vertical border */
.sidebar-submenu > .sidebar-item.open > .sidebar-submenu {
    border-left: none;
    background: rgba(255, 255, 255, 0.035);
}

.sidebar-submenu .sidebar-submenu .sidebar-link {
    padding-left: 14px;
    font-size: 0.78rem;
}

/* --- Sidebar Footer (User area) --- */
.sidebar-footer {
    border-top: 1px solid var(--sidebar-border);
    padding: 12px 10px;
    flex-shrink: 0;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--sidebar-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    text-decoration: none;
    color: var(--sidebar-text);
}

.sidebar-user:hover {
    background: var(--sidebar-hover-bg);
    color: var(--sidebar-text);
    text-decoration: none;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    flex-shrink: 0;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.sidebar-user-info {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.sidebar-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.sidebar-user-email {
    font-size: 0.7rem;
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

/* Ellipsis dots */
.sidebar-user-dots {
    opacity: 0.5;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* User dropdown (pops upward) */
.sidebar-user-dropdown {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.18);
    padding: 8px 0;
    display: none;
    z-index: 6000;
    min-width: 220px;
    animation: slideUp 0.25s ease;
}

.sidebar-user-dropdown.show {
    display: block;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sidebar-user-dropdown .dropdown-header {
    text-align: center;
    padding: 12px 16px 8px;
    border-bottom: 1px solid #eee;
    margin-bottom: 4px;
}

.sidebar-user-dropdown .dropdown-header .user-full-name {
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1.4;
    color: #333;
}

.sidebar-user-dropdown .dropdown-header .user-email {
    font-size: 0.78rem;
    color: #888;
}

.sidebar-user-dropdown .dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    color: #444;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: all 0.15s ease;
    margin: 0 6px;
    border-radius: 6px;
}

.sidebar-user-dropdown .dropdown-link .fas {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    color: #777;
}

.sidebar-user-dropdown .dropdown-link:hover {
    background: #f4f6f9;
    color: #333;
}

.sidebar-user-dropdown .dropdown-section-title {
    padding: 8px 16px 4px;
    color: #8a97a6;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-user-dropdown .dropdown-link.text-danger {
    background-color: #dc3545;
    color: #fff;
    margin: 6px 12px 4px;
    padding: 10px 16px;
    justify-content: center;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.25);
}

.sidebar-user-dropdown .dropdown-link.text-danger .fas {
    color: #fff;
}

.sidebar-user-dropdown .dropdown-link.text-danger:hover,
.sidebar-user-dropdown .dropdown-link.text-danger:hover .fas {
    background-color: #c82333;
    color: #fff;
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.35);
}

.sidebar-user-dropdown .dropdown-divider {
    height: 0;
    border-top: 1px solid #eee;
    margin: 4px 12px;
}

.sidebar-user-dropdown .theme-selector {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 6px 0;
}

.sidebar-user-dropdown .theme-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-block;
}

.sidebar-user-dropdown .theme-dot:hover {
    transform: scale(1.2);
    border-color: rgba(0, 0, 0, 0.2);
}

/* ============================================================
   TOPBAR (Main content header)
   ============================================================ */
.topbar {
    height: var(--topbar-height);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0 24px;
    background: #fff;
    border-bottom: 1px solid #e8ecf1;
    z-index: 4500;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.topbar-toggle {
    width: 38px;
    height: 38px;
    border: none;
    background: #f4f6f9;
    color: #555;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.topbar-toggle:hover {
    background: #e8ecf1;
    color: #333;
}

.topbar-brand {
    display: none;
    align-items: center;
    gap: 10px;
    color: #243142;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    flex-shrink: 0;
}

.topbar-brand:hover,
.topbar-brand:focus {
    color: var(--sidebar-bg, #337ab7);
    text-decoration: none;
}

.topbar-brand img {
    height: 34px;
    width: 34px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--sidebar-bg, #337ab7);
    padding: 4px;
}

.topbar-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--sidebar-bg, #337ab7);
    color: #fff;
    font-size: 0.95rem;
}

@media (max-width: 991.98px) {
    .topbar-brand {
        display: inline-flex;
    }

    .topbar-brand img,
    .topbar-brand-icon {
        display: none;
    }

    .topbar-title {
        display: none;
    }

}

.topbar-title {
    font-size: 1.14rem;
    font-weight: 600;
    color: #333;
    flex: 1;
    min-width: 0;
}

.topbar-title-stack {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    max-width: 100%;
    line-height: 1.15;
}

.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
}

.topbar-breadcrumb-back {
    color: var(--sidebar-bg, #337ab7);
    text-decoration: none;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-breadcrumb-back:hover,
.topbar-breadcrumb-back:focus {
    color: var(--sidebar-bg-dark, #286090);
    text-decoration: none;
}

.topbar-breadcrumb-separator {
    flex-shrink: 0;
    color: #a0aec0;
    font-size: 0.72rem;
}

.topbar-breadcrumb-context {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #718096;
    font-weight: 700;
}

.topbar-breadcrumb-current {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #2d3748;
}

.topbar-breadcrumb-meta {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #64748b;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.2;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex-shrink: 0;
    margin-left: auto;
}

.topbar-icon-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    color: #666;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    position: relative;
    text-decoration: none;
}

.topbar-icon-btn:hover {
    background: #f4f6f9;
    color: #333;
    text-decoration: none;
}

.topbar-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: #e74c3c;
    border-radius: 50%;
    border: 2px solid #fff;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
    margin-left: var(--sidebar-width);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: margin-left 0.3s ease;
    background: #f4f6f9;
}

.main-content .content-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    padding: 24px;
    max-width: 100%;
    overflow: auto;
    scrollbar-gutter: stable;
    transition: box-shadow 0.2s ease;
}

.main-content .content-wrapper.is-overflowing-x {
    box-shadow: inset -14px 0 18px -18px rgba(15, 23, 42, 0.55);
}

@media (min-width: 992px) {
    .topbar-source-heading,
    .topbar-source-subtitle,
    .topbar-source-divider,
    body.has-topbar-breadcrumb .main-content .content-wrapper > h2:first-of-type,
    body.has-topbar-breadcrumb .main-content .content-wrapper > h2:first-of-type + div > h4:first-child,
    body.has-topbar-breadcrumb .main-content .content-wrapper > h2:first-of-type + div > h4:first-child + hr {
        display: none;
    }
}

/* ============================================================
   SIDEBAR OVERLAY (mobile)
   ============================================================ */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 4999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================================
   COLLAPSED STATE (Desktop)
   ============================================================ */
body.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
    overflow: visible;
}

/* Hide inner content of the sidebar when collapsed, keep the nav scrollable */
body.sidebar-collapsed .sidebar-nav {
    overflow-y: auto;
    overflow-x: visible;
}

body.sidebar-collapsed .sidebar-logo-text,
body.sidebar-collapsed .sidebar-section-label,
body.sidebar-collapsed .sidebar-text,
body.sidebar-collapsed .sidebar-chevron,
body.sidebar-collapsed .sidebar-badge,
body.sidebar-collapsed .sidebar-user-info,
body.sidebar-collapsed .sidebar-user-dots {
    opacity: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

body.sidebar-collapsed .sidebar-header {
    padding: 14px 8px;
    min-height: auto;
    justify-content: center;
}

body.sidebar-collapsed .sidebar-logo {
    justify-content: center;
}

body.sidebar-collapsed .sidebar-logo img {
    width: 44px;
    height: 44px;
    padding: 4px;
    border-radius: 10px;
}

body.sidebar-collapsed .sidebar-logo-icon {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
}

body.sidebar-collapsed .sidebar-collapse-btn {
    display: none;
}

body.sidebar-collapsed .sidebar-link {
    justify-content: center;
    padding: 10px;
    gap: 0;
}

/* Active item in collapsed state — no border-left, just background dot */
body.sidebar-collapsed .sidebar-link.active {
    border-left: none;
    border-radius: var(--sidebar-radius);
    padding-left: 10px;
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3) inset;
}

/* Sidebar colapsado: el padre nivel 1 con un descendiente activo recibe la indicación */
body.sidebar-collapsed .sidebar-item.has-submenu:has(.sidebar-link.active) > .sidebar-link {
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3) inset;
    color: #fff !important;
    border-radius: var(--sidebar-radius);
}

/* Punto indicador a la derecha del icono cuando hay descendiente activo */
body.sidebar-collapsed .sidebar-item.has-submenu:has(.sidebar-link.active) > .sidebar-link::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffd166;
    box-shadow: 0 0 0 2px var(--sidebar-bg);
}

body.sidebar-collapsed .sidebar-submenu {
    max-height: 0 !important;
    margin-left: 0;
    border-left: none;
}

body.sidebar-collapsed .sidebar-user {
    justify-content: center;
    padding: 10px;
    gap: 0;
}

body.sidebar-collapsed .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* Tooltips are handled via JavaScript for reliability */

/* JS Tooltip element */
.sidebar-tooltip {
    position: fixed;
    background: #2d3748;
    color: #fff !important;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 99999;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.15s ease;
    font-family: 'Inter', sans-serif;
}

.sidebar-tooltip.visible {
    opacity: 1;
}

/* User dropdown when collapsed — position to the right */
body.sidebar-collapsed .sidebar-user-dropdown {
    left: calc(var(--sidebar-collapsed-width) + 8px);
    bottom: 10px;
    right: auto;
    width: 240px;
    position: fixed;
}

/* ============================================================
   RESPONSIVE — Mobile (<992px)
   ============================================================ */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.2);
        overflow: hidden;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
    }

    .sidebar-collapse-btn {
        display: none;
    }

    .topbar {
        padding: 0 16px;
    }

    .main-content .content-wrapper {
        padding: 16px;
    }
}

/* ============================================================
   TOPBAR — User profile + dropdown (moved from sidebar footer)
   ============================================================ */
.topbar-user {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px 4px 4px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease;
    user-select: none;
    margin-left: auto;
    background: #f6f8fb;
}

.topbar-user:hover,
.topbar-user.open {
    background: #eef2f7;
}

.topbar-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--sidebar-bg, #337ab7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    flex-shrink: 0;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.topbar-user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
    max-width: 180px;
}

.topbar-user-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #243142;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-user-role {
    font-size: 0.72rem;
    color: #718096;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-user-caret {
    color: #a0aec0;
    font-size: 0.72rem;
    margin-left: 2px;
    transition: transform 0.2s ease;
}

.topbar-user.open .topbar-user-caret {
    transform: rotate(180deg);
}

.topbar-user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #f5f7fa;
    border: 1px solid #d8dee7;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
    padding: 4px 0;
    display: none;
    z-index: 6000;
    min-width: 240px;
    animation: topbarDropdown 0.2s ease;
}

.topbar-user-dropdown.show {
    display: block;
}

@keyframes topbarDropdown {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.topbar-user-dropdown .dropdown-header {
    text-align: center;
    padding: 14px 18px 12px;
    background: linear-gradient(180deg, #eef2f7 0%, #f8fafc 100%);
    border-bottom: 1px solid #d8dee7;
    margin: -4px 0 6px;
    border-radius: 9px 9px 0 0;
}

.topbar-user-dropdown .dropdown-header .user-full-name {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.25;
    color: #1e293b;
    word-break: break-word;
}

.topbar-user-dropdown .dropdown-header .user-email {
    margin-top: 4px;
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.35;
    word-break: break-word;
}

.topbar-user-dropdown .dropdown-header .user-email-local {
    display: block;
    font-weight: 600;
    color: #475569;
}

.topbar-user-dropdown .dropdown-header .user-email-domain {
    display: block;
    font-size: 0.72rem;
    color: #94a3b8;
}

.topbar-user-dropdown .dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    color: #334155;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease;
    margin: 0 4px;
    border-radius: 6px;
}

.topbar-user-dropdown .dropdown-link .fas {
    font-size: 0.95rem;
    width: 18px;
    text-align: center;
    color: #64748b;
}

.topbar-user-dropdown .dropdown-link:hover {
    background: #ffffff;
    color: #1e293b;
}

.topbar-user-dropdown .dropdown-link.dropdown-link-danger,
.topbar-user-dropdown .dropdown-link.dropdown-link-danger .fas {
    color: #dc3545;
}

.topbar-user-dropdown .dropdown-link.dropdown-link-danger:hover {
    background: #ffe3e6;
    color: #b21f2d;
}

.topbar-user-dropdown .dropdown-link.dropdown-link-danger:hover .fas {
    color: #b21f2d;
}

.topbar-user-dropdown .dropdown-section-title {
    padding: 4px 14px 2px;
    color: #8a97a6;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.topbar-user-dropdown .dropdown-divider {
    height: 0;
    border-top: 1px solid #d8dee7;
    margin: 2px 12px;
}

.topbar-user-dropdown .theme-selector {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 4px 0 6px;
}

.topbar-user-dropdown .theme-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: transform 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    display: inline-block;
}

.topbar-user-dropdown .theme-dot:hover {
    transform: scale(1.2);
    border-color: rgba(0, 0, 0, 0.2);
}

@media (max-width: 991.98px) {
    .topbar-user-info {
        display: none;
    }

    .topbar-user-caret {
        display: none;
    }

    .topbar-user {
        padding: 2px;
        margin-left: auto;
        background: transparent;
    }

    .topbar-user:hover,
    .topbar-user.open {
        background: #e2e8f0;
    }
}

/* ============================================================
   ESTADO BADGES (pills for state column in expediente tables)
   ============================================================ */
.estado-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.4;
    white-space: nowrap;
}

.estado-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    background: currentColor;
    opacity: 0.9;
}

.estado-badge--gold { background: #fef4d6; color: #a07400; }
.estado-badge--red { background: #fde7e6; color: #c2342f; }
.estado-badge--blue { background: #e3effd; color: #2563b6; }
.estado-badge--green { background: #e9f7ed; color: #2d8a4f; }

/* ============================================================
   TOPBAR — Breadcrumb context inline badge
   ============================================================ */
.topbar-breadcrumb-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(51, 122, 183, 0.10);
    color: var(--sidebar-bg, #337ab7);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
    margin-left: 4px;
}

/* ============================================================
   SIDEBAR — Logout button (replaces sidebar-user)
   ============================================================ */
.sidebar-logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: transparent;
    color: #ff5b6a;
    border: none;
    border-radius: var(--sidebar-radius);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 700;
    text-align: left;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.sidebar-logout-btn .fas {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
    color: inherit;
    opacity: 1;
}

.sidebar-logout-btn:hover,
.sidebar-logout-btn:focus {
    background: var(--sidebar-hover-bg);
    color: #ff5b6a;
    outline: none;
    transform: translateX(2px);
}

.sidebar-logout-text {
    flex: 1;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.2s ease, width 0.2s ease;
}

body.sidebar-collapsed .sidebar-logout-btn {
    justify-content: center;
    padding: 10px;
    gap: 0;
}

body.sidebar-collapsed .sidebar-logout-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

/* ============================================================
   CONFIRM MODAL (logout confirmation)
   ============================================================ */
.confirm-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 9000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: confirmFade 0.18s ease;
}

.confirm-modal.show {
    display: flex;
}

@keyframes confirmFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.confirm-modal-dialog {
    background: #fff;
    border-radius: 14px;
    padding: 28px 28px 22px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    text-align: center;
    animation: confirmPop 0.22s ease;
}

@keyframes confirmPop {
    from { opacity: 0; transform: scale(0.94) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.confirm-modal-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: #fff5f5;
    color: #dc3545;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.confirm-modal-title {
    margin: 0 0 6px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #243142;
}

.confirm-modal-text {
    margin: 0 0 20px;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

.confirm-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.confirm-modal-actions .btn-cancel,
.confirm-modal-actions .btn-confirm {
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
    font-family: inherit;
}

.confirm-modal-actions .btn-cancel {
    background: #f1f5f9;
    color: #334155;
}

.confirm-modal-actions .btn-cancel:hover {
    background: #e2e8f0;
}

.confirm-modal-actions .btn-confirm {
    background: #dc3545;
    color: #fff;
}

.confirm-modal-actions .btn-confirm:hover,
.confirm-modal-actions .btn-confirm:focus {
    background: #c82333;
    color: #fff;
    text-decoration: none;
}

/* ============================================================
   NO-SIDEBAR PAGES (Login, error, prueba)
   ============================================================ */
body.no-sidebar .main-content {
    margin-left: 0;
    background: none;
}

/* Minimal top bar for unauthenticated pages */
.mini-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 56px;
    height: var(--topbar-height, 60px);
    flex-shrink: 0;
    background: var(--sidebar-bg, #337ab7);
    color: var(--sidebar-text, #ecf0f1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 4500;
}

body.no-sidebar {
    padding-top: 0;
    height: 100vh;
    overflow: hidden;
}

.mini-topbar .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--sidebar-text, #ecf0f1);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.5px;
}

.mini-topbar .brand:hover,
.mini-topbar .brand:focus {
    color: #fff;
    text-decoration: none;
}

.mini-topbar .brand img {
    height: 36px;
    width: 36px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    padding: 4px;
}

.mini-topbar .brand .mini-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    width: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 1.05rem;
}

.mini-topbar .mini-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 8px 18px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.mini-topbar .mini-action:hover,
.mini-topbar .mini-action:focus {
    color: #fff;
    border-color: #fff;
    background: rgba(255, 255, 255, 0.18);
    text-decoration: none;
}

@media (max-width: 575.98px) {
    .mini-topbar {
        padding: 10px 28px;
    }

    .mini-topbar .brand {
        font-size: 1rem;
        gap: 10px;
    }

    .mini-topbar .brand img,
    .mini-topbar .brand .mini-brand-icon {
        height: 32px;
        width: 32px;
    }

    .mini-topbar .mini-action {
        padding: 7px 12px;
        font-size: 0.8rem;
    }
}

/* ============================================================
   HOME PAGE / DASHBOARD
   ============================================================ */
.home-dashboard {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.home-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px;
    background: #fff;
    border: 1px solid #e7ebf0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.home-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: #6f7b88;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.home-hero h1 {
    margin: 0;
    color: #25313f;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.25;
}

.home-hero p {
    margin: 6px 0 0;
    color: #718096;
    font-size: 0.92rem;
}

.home-session-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 260px;
    padding: 12px 14px;
    background: #f7f9fb;
    border: 1px solid #edf1f5;
    border-radius: 8px;
}

.home-session-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 8px;
    background: #e9f2fb;
    color: #337ab7;
    font-size: 1.1rem;
}

.home-session-summary strong,
.home-session-summary span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-session-summary strong {
    color: #2d3748;
    font-size: 0.9rem;
    font-weight: 700;
}

.home-session-summary span {
    color: #718096;
    font-size: 0.78rem;
}

.home-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.home-section-heading h2 {
    margin: 0;
    color: #2d3748;
    font-size: 1.05rem;
    font-weight: 700;
}

.home-section-heading p {
    margin: 4px 0 0;
    color: #718096;
    font-size: 0.84rem;
}

.home-section-heading > span {
    flex-shrink: 0;
    padding: 5px 10px;
    border-radius: 999px;
    background: #edf2f7;
    color: #4a5568;
    font-size: 0.78rem;
    font-weight: 700;
}

.home-menu-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.home-menu-group,
.home-utility-panel,
.home-empty-state,
.home-login-panel {
    background: #fff;
    border: 1px solid #e7ebf0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

.home-menu-group {
    overflow: hidden;
}

.home-menu-group-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid #edf1f5;
    background: #fbfcfd;
}

.home-group-icon,
.home-option-icon,
.home-login-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.home-group-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #eef6f0;
    color: #449d44;
}

.home-menu-group-header h3 {
    margin: 0;
    color: #2d3748;
    font-size: 0.95rem;
    font-weight: 700;
}

.home-menu-group-header p {
    margin: 2px 0 0;
    color: #8a97a6;
    font-size: 0.76rem;
}

.home-option-list {
    padding: 8px;
}

.home-option-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #334155;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.home-option-card:hover {
    background: #f3f7fb;
    color: #1f2937;
    text-decoration: none;
    transform: translateX(2px);
}

.home-option-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #eef2f7;
    color: #337ab7;
    font-size: 0.9rem;
}

.home-option-body {
    min-width: 0;
    flex: 1;
}

.home-option-title,
.home-option-meta {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-option-title {
    color: #2d3748;
    font-size: 0.88rem;
    font-weight: 700;
}

.home-option-meta {
    color: #94a3b8;
    font-size: 0.74rem;
}

.home-option-arrow {
    color: #a0aec0;
    font-size: 0.72rem;
}

.home-empty-state {
    padding: 32px 24px;
    text-align: center;
}

.home-empty-state .fas {
    color: #a0aec0;
    font-size: 1.6rem;
}

.home-empty-state h3 {
    margin: 12px 0 4px;
    color: #2d3748;
    font-size: 1rem;
    font-weight: 700;
}

.home-empty-state p {
    margin: 0;
    color: #718096;
    font-size: 0.86rem;
}

.home-utility-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.home-utility-panel {
    padding: 18px;
}

.home-utility-panel h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: #2d3748;
    font-size: 0.95rem;
    font-weight: 700;
}

.home-utility-panel h3 .fas {
    color: #718096;
}

.home-utility-links {
    display: grid;
    gap: 6px;
}

.home-utility-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    color: #4a5568;
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
}

.home-utility-links a:hover {
    background: #f3f7fb;
    color: #2d3748;
    text-decoration: none;
}

.home-utility-links a .fas {
    width: 18px;
    color: #718096;
    text-align: center;
}

.home-session-details {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 8px 12px;
    margin: 0;
    font-size: 0.84rem;
}

.home-session-details dt {
    color: #8a97a6;
    font-weight: 700;
}

.home-session-details dd {
    min-width: 0;
    margin: 0;
    color: #334155;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-login-view {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.home-login-panel {
    width: min(100%, 420px);
    padding: 32px;
    text-align: center;
}

.home-login-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    border-radius: 8px;
    background: #e9f2fb;
    color: #337ab7;
    font-size: 1.3rem;
}

.home-login-panel h1 {
    margin: 0;
    color: #2d3748;
    font-size: 1.4rem;
    font-weight: 700;
}

.home-login-panel p {
    margin: 8px 0 20px;
    color: #718096;
    font-size: 0.9rem;
}

.home-login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 8px;
    background: #337ab7;
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
}

.home-login-button:hover {
    background: #286090;
    color: #fff !important;
    text-decoration: none;
}

.home-login-message {
    margin-top: 18px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff5f5;
    color: #c53030;
    font-size: 0.82rem;
}

@media (max-width: 767.98px) {
    .home-hero,
    .home-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-session-summary {
        width: 100%;
        min-width: 0;
    }

    .home-menu-groups,
    .home-utility-row {
        grid-template-columns: 1fr;
    }

    .home-login-panel {
        padding: 26px 20px;
    }
}

/* ============================================================
   PAGINATION — Modern pill-style buttons
   ============================================================ */
.pagination {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0;
    margin: 0;
    list-style: none;
    align-items: center;
}

.pagination .page-item {
    margin: 0;
}

.pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid #e4e7eb;
    border-radius: 8px;
    background: #fff;
    color: #4a5568;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1;
    transition: background-color 0.15s ease,
                color 0.15s ease,
                border-color 0.15s ease,
                box-shadow 0.15s ease,
                transform 0.1s ease;
    cursor: pointer;
}

.pagination .page-link:hover {
    background: #f3f6fa;
    color: #1f2937;
    border-color: #cfd6df;
    text-decoration: none;
}

.pagination .page-link:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(51, 122, 183, 0.18);
}

.pagination .page-link:active {
    transform: translateY(1px);
}

.pagination .page-item.active .page-link,
.pagination .active > .page-link {
    background: var(--sidebar-bg, #337ab7);
    border-color: var(--sidebar-bg, #337ab7);
    color: #fff;
    box-shadow: 0 2px 6px rgba(51, 122, 183, 0.25);
}

.pagination .page-item.active .page-link:hover,
.pagination .active > .page-link:hover {
    background: #2a6395;
    border-color: #2a6395;
    color: #fff;
}

.pagination .page-item.disabled .page-link,
.pagination .disabled > .page-link {
    color: #b3b9c2;
    cursor: not-allowed;
    pointer-events: none;
}

/* Sobreescribe el border-radius que Bootstrap aplica al primer y último item
   para que TODOS los botones tengan exactamente las mismas esquinas */
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link,
.pagination li:first-child .page-link,
.pagination li:last-child .page-link {
    border-radius: 8px;
}

/* Items-per-page dropdown sits next to the pagination — keep it visually
   consistent with the page buttons */
#ItemsPerPageList {
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e4e7eb;
    background-color: #fff;
    color: #4a5568;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0 30px 0 12px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#ItemsPerPageList:hover {
    border-color: #cfd6df;
}

#ItemsPerPageList:focus {
    outline: none;
    border-color: var(--sidebar-bg, #337ab7);
    box-shadow: 0 0 0 3px rgba(51, 122, 183, 0.18);
}

/* ============================================================
   FOOTER — Discreto, al final del contenido (no fijo).
   Aparece justo después del contenido del view; si el contenido
   es alto, queda visible al hacer scroll hasta el final.
   ============================================================ */
.app-footer {
    margin-top: 24px;
    padding: 10px 16px 4px;
    text-align: center;
    font-size: 0.7rem;
    color: #9ca3af;
    background: transparent;
    border-top: 1px solid #e5e7eb;
    letter-spacing: 0.02em;
    user-select: none;
}

@media (max-width: 991.98px) {
    .app-footer {
        margin-top: 16px;
        padding: 6px 12px 2px;
        font-size: 0.62rem;
        letter-spacing: 0.01em;
    }
}

/* ============================================================
   COLUMNA "Asunto" en tablas Index — oculta en mobile para que
   la tabla no se estire de más. La clase .col-asunto se aplica
   automáticamente desde _Layout.cshtml a la celda cuyo header
   sea "Asunto".
   ============================================================ */
@media (max-width: 991.98px) {
    .main-content .content-wrapper table.table td.col-asunto,
    .main-content .content-wrapper table.table th.col-asunto {
        display: none;
    }
}

