:root {
    /* Modern Dark Theme Palette - Slate & Indigo */
    --bs-body-bg: #0f172a;
    /* Slate 950 - Fondo profundo */
    --bs-body-color: #cbd5e1;
    /* Slate 300 - Texto legible */
    --bs-dark: #1e293b;
    /* Slate 800 - Superficies */
    --bs-light: #334155;
    /* Slate 700 - Bordes/Separadores */
    --bs-border-color: rgba(255, 255, 255, 0.1);
    /* Bordes sutiles más visibles para glass */
    --bs-primary: #6366f1;
    /* Indigo 500 - Acento principal */
    --bs-primary-rgb: 99, 102, 241;

    /* FullCalendar Variables */
    --fc-border-color: var(--bs-border-color);
    --fc-button-bg-color: rgba(255, 255, 255, 0.05);
    --fc-button-border-color: var(--bs-border-color);
    --fc-button-text-color: #e2e8f0;
    --fc-button-hover-bg-color: rgba(255, 255, 255, 0.1);
    --fc-button-hover-border-color: var(--bs-border-color);
    --fc-button-active-bg-color: var(--bs-primary);
    --fc-button-active-border-color: var(--bs-primary);
    --fc-button-active-text-color: #fff;
    --fc-today-bg-color: rgba(99, 102, 241, 0.1);
    --fc-page-bg-color: transparent;
    --fc-neutral-bg-color: transparent;
    --fc-list-event-hover-bg-color: rgba(255, 255, 255, 0.05);
}

/* --- Global Styles --- */
/* --- Global Styles --- */
html {
    height: 100%;
}

body {
    min-height: 100vh;
    background-color: #0f172a !important;
    /* Color base */
    color: var(--bs-body-color) !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;

    /* Fondo Global Fijo aplicado al Body directamente */
    background-image:
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.35), transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.30), transparent 40%),
        radial-gradient(circle at 90% 10%, rgba(99, 102, 241, 0.25), transparent 40%),
        radial-gradient(circle at 10% 90%, rgba(168, 85, 247, 0.25), transparent 40%);
    background-attachment: fixed !important;
    /* Clave para que no se mueva al hacer scroll */
    background-size: 100vw 100vh;
    background-repeat: no-repeat;
}

/* Eliminar ::before antiguo para evitar conflictos */
body::before {
    display: none;
}

/* FORZAR TRANSPARENCIA GLOBAL EN CONTENEDORES DE ESTRUCTURA */
.wrapper,
.main-panel,
.content,
.container,
.container-fluid,
.row,
.col,
.col-12,
.col-md-6,
.col-lg-4,
.col-lg-8,
/* Selectores comunes de Bootstrap */
div[class*="col-"] {
    background: transparent !important;
    background-color: transparent !important;
}

/* Modern Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bs-body-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--bs-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* 
   Cards & Containers (High Contrast Glass) 
   Borde blanco más notable para evitar fusión con fondo
*/
.card,
.modal-content {
    /* Fondo un poco más claro para contraste */
    background: rgba(30, 41, 59, 0.75) !important;

    /* BORDE DE CONTRASTE (High Visibility) */
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.3) !important;
    /* Luz cenital */

    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;

    color: #f1f5f9 !important;
    /* Texto más brillante */
    border-radius: 1rem !important;
    position: relative;
    z-index: 1;
}

.dropdown-menu {
    /* Fondo un poco más claro para contraste */
    background: rgba(30, 41, 59, 0.95) !important;

    /* BORDE DE CONTRASTE (High Visibility) */
    border: 1px solid rgba(255, 255, 255, 0.2) !important;

    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);

    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;

    color: #f1f5f9 !important;
    border-radius: 1rem !important;
    z-index: 9999 !important;
}

/* Elementos secundarios SIN blur para rendimiento */
.bg-white,
.bg-light {
    background-color: rgba(30, 41, 59, 1) !important;
    /* Fondo sólido fallback */
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 1rem !important;
    color: #e2e8f0 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Headers de tarjetas más claros para separar */
.card-header,
.card-footer,
.modal-header,
.modal-footer {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
    padding: 1.25rem 1.5rem;
    font-weight: 700;
}

.card-body {
    padding: 1.5rem;
}

/* Tables */
.table {
    --bs-table-bg: transparent !important;
    color: #e2e8f0 !important;
    border-color: var(--bs-border-color) !important;
}

.table thead th {
    background-color: rgba(15, 23, 42, 0.9) !important;
    /* Casi opaco */
    border-bottom-width: 1px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: #94a3b8 !important;
    font-weight: 700;
    padding: 1rem;
    backdrop-filter: none !important;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-hover tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.03) !important;
    color: #fff !important;
}

/* Forms (Optimized Inputs) */
.form-control,
.form-select,
.input-group-text {
    background-color: #0f172a !important;
    /* Fondo sólido oscuro */
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    transition: border-color 0.2s, box-shadow 0.2s;
    border-radius: 0.5rem;
    padding: 0.6rem 1rem;
    backdrop-filter: none !important;
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(15, 23, 42, 0.9) !important;
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(99, 102, 241, 0.25) !important;
}

.form-floating>label {
    color: #94a3b8;
}

input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #1e293b inset !important;
    -webkit-text-fill-color: white !important;
}

/* Buttons */
.btn {
    border-radius: 0.5rem;
    padding: 0.6rem 1.2rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border: none;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(79, 70, 229, 0.3);
}

.btn-light,
.btn-secondary,
.btn-white {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--bs-border-color) !important;
    color: #e2e8f0 !important;
}

.btn-light:hover,
.btn-secondary:hover,
.btn-white:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Dropdowns */
.dropdown-menu {
    padding: 0.5rem;
    margin-top: 0 !important;
    /* FIX: Elimina el espacio que rompe el hover */
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5) !important;
}

.dropdown-item {
    border-radius: 0.375rem;
    color: #cbd5e1 !important;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 0;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--bs-primary) !important;
    color: #fff !important;
}

/* --- FullCalendar Modernization --- */
.fc-theme-standard .fc-scrollgrid {
    border: 1px solid var(--fc-border-color);
    border-radius: 1rem;
    overflow: hidden;
    background-color: rgba(30, 41, 59, 0.3);
}

.fc-header-toolbar {
    margin-bottom: 2rem !important;
}

.fc-toolbar-title {
    font-size: 1.5rem !important;
    font-weight: 800;
    color: #fff !important;
    letter-spacing: -0.025em;
}

.fc-col-header-cell-cushion {
    padding: 1rem 0;
    color: #94a3b8;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

.fc-daygrid-day-number {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 4px;
    font-weight: 700;
    color: #cbd5e1;
    transition: all 0.2s;
}

.fc-day-today .fc-daygrid-day-number {
    background: var(--bs-primary);
    color: white;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
    transform: scale(1.1);
}

.custom-event-card {
    background: rgba(51, 65, 85, 0.8);
    border-radius: 8px;
    border-left: 3px solid var(--bs-primary);
    padding: 6px 10px;
    margin: 0;
    width: 100%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.custom-event-card:hover {
    transform: translateY(-2px);
    background: rgba(71, 85, 105, 0.9);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.event-thumb {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    background-color: #0f172a;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.event-info {
    flex-grow: 1;
    overflow: hidden;
    line-height: 1.2;
    min-width: 0;
    /* Crítico para que funcione el truncado en Flexbox */
}

.event-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 767px) {

    /* Make calendar toolbar more compact */
    .fc-header-toolbar {
        flex-direction: column !important;
        gap: 1rem;
        align-items: stretch !important;
    }

    .fc-toolbar-chunk {
        display: flex;
        justify-content: space-between;
        width: 100%;
    }

    .fc-toolbar-chunk:nth-child(2) {
        /* Center the title */
        justify-content: center;
        order: -1;
        /* Move title to the top */
    }

    .fc-toolbar-title {
        font-size: 1.25rem !important;
    }

    /* Simplify calendar events on mobile to save space */
    .custom-event-card {
        padding: 4px 8px;
        gap: 8px;
    }

    .event-thumb {
        display: none;
        /* Hide image thumbnail on mobile */
    }

    .event-title {
        font-size: 0.75rem;
    }

    /* Reduce padding on day headers */
    .fc-col-header-cell-cushion {
        padding: 0.5rem 0;
    }

    /* Mobile List View Improvements */
    .fc-list-event-title {
        white-space: normal !important;
        /* Permitir que el texto baje de línea en móviles */
        line-height: 1.4;
    }
}

.event-time {
    font-size: 0.65rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
}

.fc-list-day-cushion {
    background-color: var(--bs-dark) !important;
}

.fc-list-event:hover td {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

/* FullCalendar General Truncation */
.fc-event-title,
.fc-list-event-title {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.fc-list-event-title {
    max-width: 400px;
    /* Evita que la lista se ensanche demasiado */
}

/* Fix for FullCalendar Events overflowing cells */
.fc-daygrid-event {
    white-space: normal !important;
    background: transparent !important;
    border: none !important;
    margin-top: 2px !important;
    margin-bottom: 2px !important;
}

/* Fix for Week/TimeGrid View Events */
.fc-timegrid-event {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.fc-timegrid-event .fc-event-main {
    padding: 0 !important;
    overflow: hidden;
}

.fc-timegrid-event .custom-event-card {
    height: 100%;
    border-radius: 4px;
}

/* --- Specific Pages --- */

/* --- Specific Pages --- */

/* Login - Forzar transparencia para ver el fondo del body */
.login-wrapper {
    background: transparent !important;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Dashboard & Clients - Asegurar que no hay fondos sólidos tapando */
.wrapper,
.main-panel,
.content,
.container,
.container-fluid {
    background-color: transparent !important;
}

.branding-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4b5563 0%, #1f2937 100%);
    border-radius: 24px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

/* Dashboard Stats Gradients */
.bg-stat-1 {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(79, 70, 229, 0.15) 100%);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.bg-stat-2 {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.15) 100%);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.bg-stat-3 {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(37, 99, 235, 0.15) 100%);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.bg-stat-4 {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(217, 119, 6, 0.15) 100%);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.bg-stat-5 {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(220, 38, 38, 0.15) 100%);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.stat-card {
    transition: transform 0.2s, filter 0.2s !important;
}

.stat-card:hover {
    transform: translateY(-5px) !important;
    filter: brightness(1.1) !important;
}

/* Bulk Generate */
.unsplash-item {
    transition: all 0.2s;
    border: 3px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.unsplash-item:hover {
    transform: scale(1.05);
    z-index: 5;
}

.unsplash-item.active {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.3);
}

.unsplash-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(79, 70, 229, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    pointer-events: none;
    /* FIX: Permitir click a través del overlay */
}

/* FIX: También permitir click a través del contenedor del icono */
.unsplash-item .position-absolute {
    pointer-events: none;
}

.unsplash-item.active .overlay {
    display: flex;
}

/* Missing Height Utilities */
.h-80 {
    height: 80px !important;
}

.h-120 {
    height: 120px !important;
}

.h-150 {
    height: 150px !important;
}

/* Integrations */
.page-card {
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid var(--bs-border-color);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0.75rem;
}

.page-card:hover {
    border-color: #405DE6 !important;
    background-color: rgba(64, 93, 230, 0.05);
    transform: translateY(-2px);
}

.header-banner {
    border-left: 6px solid var(--bs-primary) !important;
}

/* Status Badges */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 700;
    border-radius: 0.5rem;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.published-badge {
    background-color: #10b981 !important;
    color: #fff !important;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.4);
}

.queued-badge {
    background-color: #3b82f6 !important;
    color: #fff !important;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.4);
}

.scheduled-badge {
    background-color: #f59e0b !important;
    color: #fff !important;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4);
}

.failed-badge {
    background-color: #ef4444 !important;
    color: #fff !important;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.4);
}

.badge-published-bg {
    background-color: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-queued-bg {
    background-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-scheduled-bg {
    background-color: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-failed-bg {
    background-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Utilities */
.text-muted {
    color: #94a3b8 !important;
}

.text-dark {
    color: #f1f5f9 !important;
}

.text-light {
    color: #e2e8f0 !important;
}

.border-light {
    border-color: var(--bs-border-color) !important;
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.cursor-pointer {
    cursor: pointer;
}

pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #e2e8f0;
}

/* Fix: Bring card to front on hover/focus so dropdowns show over siblings */
.hover-up {
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

/* Hover Utilities */
.opacity-0 {
    opacity: 0 !important;
}

.hover-opacity-100:hover {
    opacity: 1 !important;
}

.transition-opacity {
    transition: opacity 0.2s ease-in-out;
}

.hover-up:hover,
.hover-up:focus-within,
.post-card:hover,
.client-item:hover,
.card:has(.dropdown:hover),
.card:has(.dropdown-menu.show) {
    transform: translateY(-3px);
    z-index: 100 !important;
}

.obj-cover {
    object-fit: cover;
}

.w-40 {
    width: 40px !important;
}

.h-40 {
    height: 40px !important;
}

.w-45 {
    width: 45px !important;
}

.h-45 {
    height: 45px !important;
}

.w-35 {
    width: 35px;
}

.h-35 {
    height: 35px;
}

.btn-circle-32 {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Animations */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(79, 70, 229, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(79, 70, 229, 0);
    }
}

.btn-pulse {
    animation: pulse-glow 2s infinite;
}

.animate-up {
    animation: fadeInUp 0.5s ease-out;
}

/* --- Premium AI Tools Styles --- */
.fw-600 {
    font-weight: 600 !important;
}

.fw-800 {
    font-weight: 800 !important;
}

.ls-1 {
    letter-spacing: 0.05em !important;
}

.btn-icon-round {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: transform 0.2s, filter 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.btn-icon-round:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-icon-round i {
    font-size: 0.95rem;
}

.transition-all {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.border-opacity-10 {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Glass Inner Shadow */
.shadow-inner {
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06) !important;
}

/* Zoom Hover Effect */
.zoom-hover {
    transition: transform 0.2s ease;
}

.zoom-hover:hover {
    transform: scale(101%);
}

@media (max-width: 991px) {
    .ls-1 {
        letter-spacing: 0;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar & Z-Index Fixes */
.navbar {
    position: relative;
    z-index: 1050 !important;
    background: rgba(15, 23, 42, 0.8) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--bs-border-color);
}

/* THIS IS THE CRITICAL FIX for dropdowns inside containers with overflow:hidden */
.wrapper,
.main-panel,
.navbar,
.navbar .container,
.navbar .container-fluid,
.navbar-collapse {
    /* Allow dropdowns to display outside their container */
    overflow: visible !important;
}

/* EMERGENCY FIX: Global hover fallback for card-based dropdowns */
.post-card .dropdown:hover .dropdown-menu,
.client-item .dropdown:hover .dropdown-menu,
.table td .dropdown:hover .dropdown-menu,
.navbar .dropdown:hover .dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    z-index: 9999 !important;
}

.dropdown-menu.show {
    display: block !important;
}

/* --- Tabs & Navigation (Settings Page) --- */
.nav-tabs,
.nav-pills {
    border-bottom-color: var(--bs-border-color) !important;
}

.nav-tabs .nav-link,
.nav-pills .nav-link {
    color: #94a3b8 !important;
    border: 1px solid transparent !important;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    transition: all 0.2s;
}

.nav-tabs .nav-link:hover,
.nav-pills .nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.05);
}

.nav-tabs .nav-link.active,
.nav-pills .nav-link.active {
    color: #fff !important;
    background-color: var(--bs-primary) !important;
    border-radius: 0.5rem;
}

/* --- Dashboard & Layout Fixes --- */

/* 1. Restringir tamaño de imágenes en Tablas (Listas de Posts) */
.table td img,
.table th img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 0.375rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 2. Restringir tamaño de imágenes en Tarjetas (Vista Grid) */
.card-img-top,
.post-preview-img {
    width: 100%;
    height: 180px;
    /* Altura fija para uniformidad */
    object-fit: cover;
    border-top-left-radius: calc(1rem - 1px);
    border-top-right-radius: calc(1rem - 1px);
}

/* 3. Restaurar Utilidades de Dimensiones (Crítico para el Dashboard) */
.w-160 {
    width: 160px !important;
}

.h-160 {
    height: 160px !important;
}

.h-200 {
    height: 200px !important;
}

.h-250 {
    height: 250px !important;
}

.max-h-250 {
    max-height: 250px !important;
}

.max-w-150 {
    max-width: 150px !important;
}

.max-w-200 {
    max-width: 200px !important;
}

.max-w-450 {
    max-width: 450px !important;
}

/* --- Text Truncation & Overflow Fixes --- */

/* Prevent dropdowns from being clipped by table cell overflow */
.table td:has(.dropdown-menu),
.table td:has(.btn-group) {
    overflow: visible !important;
    white-space: nowrap;
}

/* Card Text Truncation (Multiline) */
.card-text,
.post-content-preview {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
}

/* Utilities */
.text-wrap {
    white-space: normal !important;
}

.text-truncate-max-120 {
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-truncate-max-220 {
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Missing Utilities for Settings Page --- */
.fw-700 {
    font-weight: 700 !important;
}

.fw-800 {
    font-weight: 800 !important;
}

.fw-900 {
    font-weight: 900 !important;
}

.fs-65 {
    font-size: 0.65rem !important;
}

.fs-70 {
    font-size: 0.7rem !important;
}

.max-h-50 {
    max-height: 50px !important;
}

.ls-1 {
    letter-spacing: 1px !important;
}
/* Custom Tooltip Styling for Dark Theme */
.tooltip-inner {
    color: #ffffff !important;
    background-color: rgba(30, 41, 59, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px);
    font-weight: 500;
}
