@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #111; 
    --bg-body: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --card-bg: #ffffff;
    --shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Border Radius Scale */
    --radius-sm: 8px;   /* badges, small elements */
    --radius-md: 12px;  /* inputs, alerts, tables */
    --radius-lg: 16px;  /* cards, modals */
    --radius-pill: 50px; /* buttons */
}

/* RESET BÁSICO IMPORTANTE */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
}

/* Main content - ocupa altura disponible centrado */
.main-content {
    min-height: calc(100vh - 73px);
    min-height: calc(100dvh - 73px);
    display: flex;
    flex-direction: column;
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* NAVBAR */
.navbar-custom {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-main) !important;
}

/* Logo responsive: por defecto mostrar logo completo */
.logo-full {
    display: inline-block !important;
}

.logo-icon {
    display: none !important;
}

/* En pantallas pequeñas: mostrar solo icono */
@media (max-width: 480px) {
    .logo-full {
        display: none !important;
    }
    
    .logo-icon {
        display: inline-block !important;
    }
}

/* En pantallas muy pequeñas: ocultar también BETA */
@media (max-width: 360px) {
    .beta-badge {
        display: none !important;
    }
}

/* Badge BETA */
.beta-badge {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 3px 6px;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 4px;
    text-transform: uppercase;
}

/* Navbar icon buttons - botones con borde, bien escalados */
.nav-icon-btn {
    width: 40px;
    height: 40px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9 !important;
    border: 1.5px solid #e2e8f0 !important;
    color: #334155 !important;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-icon-btn:hover {
    background: #e2e8f0 !important;
    border-color: #cbd5e1 !important;
    color: #1e293b !important;
}

.nav-icon-btn svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

/* Badge de notificación para navbar */
.badge-notification {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    font-size: 11px;
    font-weight: 700;
    color: #000;
    background: #fbbf24;
    border-radius: 9px;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-sizing: border-box;
    padding: 0 4px;
}

/* Badge de warning (exclamación) */
.badge-notification.badge-warning {
    min-width: 18px;
    padding: 0;
}

/* Botones flotantes de admin */
.logs-fab,
.sugerencias-fab {
    position: fixed;
    left: 20px;
    width: 40px;
    height: 40px;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.logs-fab {
    bottom: 20px;
}

.sugerencias-fab {
    bottom: 70px;
}

.logs-fab:hover,
.sugerencias-fab:hover {
    background: #e2e8f0;
    color: #475569;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.fab-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* Botón flotante de comunidad (derecha) */
.comunidad-fab {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 40px;
    height: 40px;
    background: #111;
    color: white;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.comunidad-fab:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.fab-comunidad-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 28px;
    height: 16px;
    background: #667eea;
    color: white;
    font-size: 0.55rem;
    font-weight: 700;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    letter-spacing: 0.5px;
}

.fab-comunidad-badge.fab-todas {
    background: #64748b;
}

/* Boton de vista previa admin */
.admin-preview-form {
    position: fixed;
    right: 20px;
    bottom: 70px;
    z-index: 1000;
    margin: 0;
}

.preview-fab {
    width: 40px;
    height: 40px;
    background: #111;
    color: white;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.preview-fab:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.preview-fab.preview-active {
    background: #667eea;
    animation: pulse-preview 2s infinite;
}

.preview-fab.preview-active:hover {
    background: #5a6fd6;
}

@keyframes pulse-preview {
    0%, 100% { box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4); }
    50% { box-shadow: 0 2px 16px rgba(102, 126, 234, 0.6); }
}

@media (max-width: 768px) {
    .admin-preview-form {
        bottom: 66px;
        right: 16px;
    }
}

/* Lista de comunidades en modal */
.comunidad-selector-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comunidad-selector-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    text-decoration: none;
    color: #334155;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.15s ease;
}

.comunidad-selector-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #1e293b;
}

.comunidad-selector-item.active {
    background: #111;
    border-color: #111;
    color: white;
}

.comunidad-selector-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.comunidad-selector-item.active .comunidad-selector-icon {
    background: rgba(255,255,255,0.2) !important;
    color: white !important;
}

/* Row de comunidad con botón de preview */
.comunidad-selector-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding-right: 8px;
    transition: all 0.15s ease;
}

.comunidad-selector-row .comunidad-selector-item {
    flex-grow: 1;
    border: none;
    background: transparent;
    padding-right: 4px;
}

.comunidad-selector-row:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.comunidad-selector-row.active {
    background: #111;
    border-color: #111;
}

.comunidad-selector-row.active .comunidad-selector-item {
    color: white;
}

.comunidad-selector-row.active .comunidad-selector-icon {
    background: rgba(255,255,255,0.2) !important;
    color: white !important;
}


/* Botón de ojo para preview */
.preview-eye-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #e2e8f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.preview-eye-btn:hover {
    background: #8b5cf620;
    color: #8b5cf6;
}

.comunidad-selector-row.active .preview-eye-btn {
    background: rgba(255,255,255,0.2);
    color: white;
}

.comunidad-selector-row.active .preview-eye-btn:hover {
    background: rgba(255,255,255,0.3);
}


/* Ocultar botones flotantes en móvil */
@media (max-width: 768px) {
    .logs-fab,
    .sugerencias-fab {
        display: none;
    }
    
    .comunidad-fab {
        bottom: 16px;
        right: 16px;
    }
}

/* Navbar buttons con texto */
.navbar-custom .action-btn {
    height: 40px;
    padding: 0 16px !important;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* TARJETAS */
.card-custom {
    background: var(--card-bg);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-custom:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

/* LOGIN A PANTALLA COMPLETA (FIX DEFINITIVO) */
.login-container {
    /* POSICIONAMIENTO FIJO: Esto saca el div fuera del 'container' de Bootstrap */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999; /* Nos aseguramos de estar encima de todo */
    
    /* CENTRADO */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* FONDO DEGRADADO */
    background: linear-gradient(135deg, #fce7f3 0%, #e0f2fe 100%);
    
    /* Reseteo de márgenes por si acaso */
    margin: 0;
    padding: 0;
    
    /* Ajuste óptico: mover contenido ligeramente hacia arriba */
    padding-bottom: 4vh;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.85); /* Semitransparente */
    backdrop-filter: blur(20px); /* Efecto cristal */
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1); /* Sombra suave y larga */
}

/* RESPONSIVE - MÓVIL */
@media (max-width: 480px) {
    .login-container {
        padding: 24px;
        padding-bottom: 8vh; /* Ajuste óptico */
    }
    
    /* En móvil: sin tarjeta, contenido directo sobre el fondo */
    .login-card {
        padding: 0;
        border-radius: 0;
        background: transparent;
        backdrop-filter: none;
        border: none;
        box-shadow: none;
        max-width: 100%;
    }
    
    .login-card h2 {
        font-size: 1.75rem;
    }
    
    .login-card .mb-5 {
        margin-bottom: 1.5rem !important;
    }
    
    /* Inputs con fondo sólido en móvil para mejor legibilidad */
    .login-card .form-control {
        background-color: rgba(255, 255, 255, 0.95);
        border: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    .login-card .input-group-text {
        background-color: rgba(255, 255, 255, 0.95);
        border: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    /* Botón más prominente en móvil */
    .login-card .action-btn-primary {
        padding: 14px 16px !important;
        font-size: 1rem !important;
        border-radius: 12px;
    }
    
    /* Texto de enlaces más legible */
    .login-card .text-muted {
        color: #475569 !important;
    }
}

/* RESPONSIVE GENERAL - TABLETS Y MÓVILES */
@media (max-width: 768px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .navbar-custom {
        padding: 0.75rem 0;
    }
    
    .navbar-custom .container-fluid {
        padding-left: 12px;
        padding-right: 12px;
    }
    

    
    /* Cards */
    .card-custom,
    .card {
        border-radius: 12px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Modales */
    .modal-dialog {
        margin: 12px;
    }
    
    .modal-content {
        border-radius: 12px;
    }
    
    /* Botones de acción */
    .action-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    /* Filtros en móvil - más compactos */
    .filter-tabs {
        gap: 6px;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .filter-tabs::-webkit-scrollbar {
        display: none;
    }
    
    .filter-tab {
        padding: 8px 12px;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    /* Vista toggle más compacto */
    .view-toggle {
        flex-shrink: 0;
    }
    
.view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 32px;
    width: 32px;
    padding: 0;
    border: none;
    background: transparent;
    color: #94a3b8;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.view-btn:hover {
    color: #64748b;
}

.view-btn.active {
    background: white;
    color: #111;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Texto de botones de vista - oculto por defecto */
.view-btn-text {
    display: none;
    margin-left: 6px;
}

/* En pantallas grandes (>=992px), mostrar texto */
@media (min-width: 992px) {
    .view-toggle {
        padding: 4px;
    }
    
    .view-btn {
        width: auto;
        padding: 0 12px;
        height: 34px;
    }
    
    .view-btn svg {
        flex-shrink: 0;
    }
    
    .view-btn-text {
        display: inline;
    }
}
    
    /* Botón nuevo */
    .btn-nuevo {
        padding: 8px 14px;
        font-size: 0.8rem;
    }
    
    /* Tabla en móvil */
    .table th,
    .table td {
        padding: 0.5rem 0.4rem;
        font-size: 0.8rem;
    }
    
    /* Status badge */
    .status-btn {
        padding: 6px 10px;
        font-size: 0.7rem;
        min-width: 70px;
    }
    
    /* Formularios */
    .form-control,
    .form-select {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    
    /* Espaciado vertical */
    .py-5 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
}

/* RESPONSIVE EXTRA PEQUEÑO - Móviles pequeños */
@media (max-width: 375px) {
    .navbar-custom .container-fluid {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .login-container {
        padding: 12px;
        padding-bottom: 8vh; /* Ajuste óptico */
    }
    
    /* Filtros más compactos */
    .filter-tab {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .filter-count {
        min-width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }
    
    /* Botones */
    .action-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .btn-nuevo {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .view-btn {
        width: 32px;
        height: 32px;
    }
}

/* INPUTS */
.form-control {
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
    outline: none;
}

/* BOTONES (FIX HOVER) */
.btn-primary-custom {
    background-color: var(--primary-color); /* Negro por defecto */
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 12px 0;
    font-weight: 600;
    color: white;
    transition: all 0.2s ease;
}

/* Aquí estaba el error: forzamos color blanco y fondo oscuro al pasar el ratón */
.btn-primary-custom:hover {
    background-color: #333 !important; /* Gris muy oscuro */
    border-color: #333 !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-outline-custom {
    background: transparent;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    color: var(--text-muted);
    font-weight: 600;
}

.btn-outline-custom:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: white;
}

/* BOTONES ADICIONALES */
.btn-info-custom {
    background-color: #0ea5e9;
    border: 2px solid #0ea5e9;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-info-custom:hover {
    background-color: #0284c7 !important;
    border-color: #0284c7 !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.btn-warning-custom {
    background-color: #f59e0b;
    border: 2px solid #f59e0b;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-warning-custom:hover {
    background-color: #d97706 !important;
    border-color: #d97706 !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-success-custom {
    background-color: #10b981;
    border: 2px solid #10b981;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-success-custom:hover {
    background-color: #059669 !important;
    border-color: #059669 !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* UTILS */
.badge {
    padding: 0.4em 0.7em;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
}

/* TARJETAS CON ESTILO CONSISTENTE */
.card {
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    transition: all 0.2s ease;
}

/* TABLAS CON ESTILO MINIMALISTA */
.table {
    border-radius: 12px;
    overflow: hidden;
}

.table th {
    background-color: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.table td {
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

/* MODALES CON ESTILO REDONDEADO */
.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #f1f5f9;
    padding: 1.5rem;
}

/* ALERTAS CON ESTILO MODERNO */
.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.5rem;
}

.alert-info {
    background-color: #e0f2fe;
    color: #0369a1;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* ESTILOS ADICIONALES PARA PANEL DE EVENTO */
.evento-header-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px 16px 0 0;
}

.evento-content-white {
    background: white;
    border-radius: 0 0 16px 16px;
}

.date-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.date-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.btn-edit-mode {
    transition: all 0.3s ease;
}

.form-control-lg {
    font-size: 1.25rem;
    padding: 0.75rem 1rem;
}

.evento-title-input {
    background: rgba(255,255,255,0.95);
    border: 2px solid rgba(255,255,255,0.3);
    color: #333;
}

.evento-title-input:focus {
    background: white;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ACTION BUTTONS - Sistema de botones consistente */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1.5px solid transparent;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn-primary {
    background: #111;
    color: white;
    border-color: #111;
}
.action-btn-primary:hover {
    background: #333;
    border-color: #333;
    color: white;
}

.action-btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border-color: #e2e8f0;
}
.action-btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #1e293b;
}

.action-btn-success {
    background: #16a34a;
    color: white;
    border-color: #16a34a;
}
.action-btn-success:hover {
    background: #15803d;
    border-color: #15803d;
    color: white;
}

.action-btn-warning {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}
.action-btn-warning:hover {
    background: #d97706;
    border-color: #d97706;
    color: white;
}

.action-btn-danger {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}
.action-btn-danger:hover:not(:disabled) {
    background: #b91c1c;
    border-color: #b91c1c;
    color: white;
}
.action-btn-danger:disabled {
    background: #fecaca;
    border-color: #fecaca;
    color: #f87171;
    cursor: not-allowed;
    opacity: 0.7;
}

.action-btn-danger-outline {
    background: transparent;
    color: #dc2626;
    border-color: #fecaca;
}
.action-btn-danger-outline:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.action-btn-info {
    background: #0ea5e9;
    color: white;
    border-color: #0ea5e9;
}
.action-btn-info:hover {
    background: #0284c7;
    border-color: #0284c7;
    color: white;
}

/* Estado vacío centrado */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    gap: 1rem;
    flex-grow: 1;
}

/* Filtros que ocupan todo el ancho - 2x2 en móvil, 4 en desktop */
.filter-tabs.w-100 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.filter-tabs.w-100 .filter-tab {
    justify-content: center;
}

@media (min-width: 768px) {
    .filter-tabs.w-100 {
        display: flex;
    }
    
    .filter-tabs.w-100 .filter-tab {
        flex: 1;
    }
}

.empty-state p {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Tabla admin */
.admin-table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
}

.admin-table td {
    vertical-align: middle;
    padding: 0.875rem 0.5rem;
}

/* Badges uniformes en tabla admin */
.admin-table .badge-tabla {
    display: inline-block;
    min-width: 80px;
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    border-radius: 8px;
}

/* Colores suaves para badges de estado (global) */
.badge.bg-success {
    background-color: #dcfce7 !important;
    color: #166534 !important;
}

.badge.bg-danger {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
}

.badge.bg-secondary {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
}

/* FILTER TABS - Sistema de filtros consistente */
.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #64748b;
    background: transparent;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.filter-tab:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #64748b;
}

.filter-tab.active {
    background: white;
    border-color: #111;
    color: #111;
}

.filter-tab.active:hover {
    background: #f8fafc;
    border-color: #111;
}

.filter-tab.active .filter-count {
    background: #111;
    color: white;
}

.filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 6px;
    background: #f1f5f9;
    color: #64748b;
}

/* ============================
   TARJETAS DE EVENTOS (USUARIO)
   ============================ */
.evento-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.evento-card:hover {
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    transform: translateY(-4px);
}

/* Banner 16:9 */
.evento-banner {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    overflow: hidden;
}

.evento-banner img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Badges sobre el banner */
.evento-badge-abierto,
.evento-badge-cerrado,
.evento-badge-promo {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.evento-badge-abierto {
    background: #dcfce7;
    color: #166534;
}

.evento-badge-cerrado {
    background: #f1f5f9;
    color: #475569;
}

.evento-badge-promo {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.evento-badge-test {
    background: #111;
    color: white;
}

/* Header simple (sin banner) */
.evento-header-simple {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 20px 0;
}

.evento-header-simple .evento-titulo {
    margin: 0;
}

/* Contenido de la tarjeta */
.evento-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.evento-titulo {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 8px;
    line-height: 1.3;
}

.evento-descripcion {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 12px;
    line-height: 1.5;
}

.evento-cierre {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 16px;
}

.evento-action-container {
    margin-top: auto;
}

/* Botones de acción */
.evento-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    margin-top: auto;
}

.evento-action-test {
    background: #111;
    color: white;
}

.evento-action-test:hover {
    background: #333;
    color: white;
}

.evento-action-promo {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.evento-action-promo:hover {
    opacity: 0.9;
    color: white;
}

.evento-action-disabled {
    background: #e2e8f0;
    color: #94a3b8;
    cursor: not-allowed;
}

/* Tarjeta de promoción - borde especial */
.evento-card-promo {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #667eea 0%, #764ba2 100%) border-box;
}

.evento-card-promo:hover {
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.2);
}