/* Estilos del Calendario - Diseño Ultra Moderno 2024 */
/* Glassmorphism + Gradientes + Micro-animaciones */

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

:root {
    --primary-green: #2d6a4f;
    --primary-light: #40916c;
    --primary-dark: #1b4332;
    --accent-gold: #f4a261;
    --accent-coral: #e76f51;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --shadow-color: rgba(45, 106, 79, 0.15);
    --text-dark: #1a1a2e;
    --text-muted: #6b7280;
}

#calendar {
    background: var(--bg-glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 28px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 25px 80px var(--shadow-color),
        0 10px 30px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    animation: calendarFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes calendarFadeIn {
    from { 
        opacity: 0; 
        transform: translateY(30px) scale(0.98);
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1);
    }
}

/* Leyenda de colores - Diseño moderno con pills */
.legend {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
    padding: 0.85rem 1.25rem;
    border-radius: 16px;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.6);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.legend > div {
    background: rgba(255, 255, 255, 0.7);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

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

.legend .legend-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 
        0 0 0 2px rgba(255,255,255,0.8),
        0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.legend .legend-dot:hover {
    transform: scale(1.2);
    box-shadow: 
        0 0 0 3px rgba(255,255,255,0.9),
        0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Filtros del calendario - Diseño elegante */
#calendarFilters {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.88));
    backdrop-filter: blur(10px);
    padding: 1.25rem 1.5rem;
    border-radius: 20px;
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: filtersFadeIn 0.5s ease 0.2s both;
}

@keyframes filtersFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

#calendarFilters label {
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.3rem;
    display: block;
}

#calendarFilters input,
#calendarFilters select {
    padding: 0.7rem 1rem;
    border: 2px solid rgba(45, 106, 79, 0.15);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 140px;
    font-family: 'Plus Jakarta Sans', 'Poppins', sans-serif;
}

#calendarFilters input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

#calendarFilters input:focus,
#calendarFilters select:focus {
    outline: none;
    border-color: var(--primary-green);
    background: white;
    box-shadow: 
        0 0 0 4px rgba(45, 106, 79, 0.1),
        0 4px 12px rgba(45, 106, 79, 0.15);
    transform: translateY(-1px);
}

#calendarFilters button {
    padding: 0.7rem 1.4rem;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Plus Jakarta Sans', 'Poppins', sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#btnApplyFilters {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(45, 106, 79, 0.3);
}

#btnApplyFilters:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(45, 106, 79, 0.4);
}

#btnApplyFilters:active {
    transform: translateY(-1px);
}

#btnClearFilters {
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    color: #475569;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

#btnClearFilters:hover {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Celdas del calendario - Interactivas */
.fc .fc-daygrid-day-frame {
    min-height: 130px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    margin: 2px;
}

.fc .fc-daygrid-day {
    transition: all 0.3s ease;
}

.fc .fc-daygrid-day:hover {
    background: linear-gradient(145deg, rgba(45, 106, 79, 0.04), rgba(45, 106, 79, 0.08));
    z-index: 1;
}

.fc .fc-daygrid-day.fc-day-today {
    background: linear-gradient(145deg, rgba(45, 106, 79, 0.08), rgba(64, 145, 108, 0.12)) !important;
    border-radius: 12px;
    box-shadow: inset 0 0 0 2px rgba(45, 106, 79, 0.2);
}

.fc .fc-daygrid-day-number {
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 0.95rem;
    padding: 10px 12px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: all 0.3s ease;
}

.fc .fc-day-today .fc-daygrid-day-number {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-dark));
    color: white;
    border-radius: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(45, 106, 79, 0.3);
    font-weight: 800;
}

/* Días del encabezado */
.fc .fc-col-header-cell-cushion {
    font-weight: 700;
    color: var(--primary-dark);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 12px 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.fc .fc-col-header-cell {
    background: linear-gradient(180deg, rgba(45, 106, 79, 0.05), transparent);
}

/* Líneas de la grilla más sutiles */
.fc .fc-scrollgrid {
    border: none !important;
}

.fc .fc-scrollgrid td,
.fc .fc-scrollgrid th {
    border-color: rgba(45, 106, 79, 0.08) !important;
}

@media (max-width: 768px) {
    .fc .fc-daygrid-day-frame {
        min-height: 90px;
    }
    
    #calendarFilters {
        padding: 1rem;
    }
    
    #calendarFilters input,
    #calendarFilters select {
        min-width: 100%;
        font-size: 0.9rem;
    }
    
    .fc .fc-toolbar-title {
        font-size: 1.3rem;
    }
    
    .fc .fc-button-primary {
        padding: 0.5rem 0.8rem !important;
        font-size: 0.75rem !important;
    }
}

/* Título del calendario - Tipografía moderna */
.fc .fc-toolbar-title {
    color: var(--primary-dark);
    font-family: 'Plus Jakarta Sans', 'Fredoka One', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Botones de la barra de herramientas - Estilo premium */
.fc .fc-button-primary {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-dark) 100%) !important;
    border: none !important;
    border-radius: 12px !important;
    padding: 0.6rem 1.2rem !important;
    font-weight: 700 !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 0.85rem !important;
    letter-spacing: 0.3px !important;
    box-shadow: 0 4px 15px rgba(45, 106, 79, 0.25) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.fc .fc-button-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-green) 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(45, 106, 79, 0.35) !important;
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #0f2419 100%) !important;
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(45, 106, 79, 0.3) !important;
}

.fc .fc-button-group .fc-button {
    border-radius: 0 !important;
    margin: 0 !important;
}

.fc .fc-button-group .fc-button:first-child {
    border-radius: 12px 0 0 12px !important;
}

.fc .fc-button-group .fc-button:last-child {
    border-radius: 0 12px 12px 0 !important;
}

.fc .fc-button-group {
    box-shadow: 0 4px 15px rgba(45, 106, 79, 0.2);
    border-radius: 12px;
}

/* Estilos de eventos - Diseño premium con micro-animaciones */
.fc-event {
    border-radius: 10px !important;
    border: none !important;
    padding: 6px 10px !important;
    margin: 3px 4px !important;
    box-shadow: 
        0 3px 10px rgba(0, 0, 0, 0.12),
        0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.fc-event::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    pointer-events: none;
}

.fc-event:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.18),
        0 3px 10px rgba(0, 0, 0, 0.1);
}

.fc-event:active {
    transform: translateY(-1px) scale(1.01);
}

.fc-event .evt-title { 
    font-weight: 700; 
    line-height: 1.25; 
    font-size: 0.82rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: 0.2px;
}

.fc-event .evt-sub { 
    font-size: 0.7rem; 
    opacity: 0.92; 
    margin-top: 3px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.fc-event .evt-sub::before {
    content: '👤';
    font-size: 0.65rem;
}

/* Formulario admin */
.admin-form .form-group {
    margin-bottom: 1rem;
}

.admin-form .form-group label {
    font-weight: 600;
    color: #2c5530;
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.admin-form .form-group input,
.admin-form .form-group select,
.admin-form .form-group textarea {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: #fafbfc;
}

.admin-form .form-group input:focus,
.admin-form .form-group select:focus,
.admin-form .form-group textarea:focus {
    outline: none;
    border-color: #4a7c59;
    background: white;
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.12);
}

.admin-form .form-group input[type="checkbox"] {
    width: auto;
    accent-color: #4a7c59;
    transform: scale(1.2);
}

.admin-form .form-actions .btn-primary {
    background: linear-gradient(135deg, #4a7c59 0%, #2c5530 100%);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 12px rgba(74, 124, 89, 0.3);
    transition: all 0.2s ease;
}

.admin-form .form-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(74, 124, 89, 0.4);
}

.admin-form .form-actions .btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.admin-form .form-actions .btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-1px);
}

/* Botones de acción del calendario */
.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    color: white;
    text-decoration: none;
}

.btn-small {
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    border-radius: 6px;
    background: #dc3545;
    color: white;
    border: none;
    cursor: pointer;
}

.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1.5rem;
}

.admin-modal .admin-modal-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(27, 67, 50, 0.92), rgba(15, 23, 42, 0.88));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.admin-modal .admin-modal-container {
    position: relative;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 28px;
    padding: 0;
    width: 95%;
    max-width: 900px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 
        0 30px 80px rgba(0, 0, 0, 0.4),
        0 15px 40px rgba(45, 106, 79, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    animation: modalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-modal .admin-modal-header {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-radius: 28px 28px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.admin-modal .admin-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255,255,255,0.1), transparent);
    pointer-events: none;
}

.admin-modal .admin-modal-header h2 {
    margin: 0;
    font-family: 'Plus Jakarta Sans', 'Fredoka One', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
}

.admin-modal .admin-modal-close {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
}

.admin-modal .admin-modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg) scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.admin-modal .admin-modal-content {
    padding: 2rem;
}

@keyframes modalIn {
    from { 
        transform: translateY(-30px) scale(0.92); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0) scale(1); 
        opacity: 1; 
    }
}

/* Botón flotante para agregar info en cada día */
.add-info-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #4a7c59 0%, #2c5530 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 
        0 3px 10px rgba(74, 124, 89, 0.4),
        0 1px 3px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: all 0.25s ease;
    z-index: 2;
    font-size: 0.85rem;
}

.fc-daygrid-day:hover .add-info-btn {
    opacity: 1;
}

.add-info-btn:hover {
    transform: scale(1.15) rotate(90deg);
    box-shadow: 
        0 5px 15px rgba(74, 124, 89, 0.5),
        0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Editor de texto enriquecido dentro del modal */
#eventModal .editor { 
    background: #fff; 
    border: 2px solid #e9ecef; 
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

#eventModal .editor:focus-within {
    border-color: #4a7c59;
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.12);
}

#eventModal .editor-toolbar { 
    padding: 0.6rem; 
    border-bottom: 1px solid #eee; 
    display: flex; 
    flex-wrap: wrap; 
    gap: 0.35rem;
    background: linear-gradient(180deg, #f8f9fa 0%, #fff 100%);
}

#eventModal .editor-toolbar button { 
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.45rem 0.6rem;
    cursor: pointer;
    color: #495057;
    transition: all 0.15s ease;
}

#eventModal .editor-toolbar button:hover { 
    background: #4a7c59;
    color: white;
    border-color: #4a7c59;
    transform: translateY(-1px);
}

#eventModal .editor-toolbar .sep { 
    width: 1px; 
    height: 28px; 
    background: linear-gradient(180deg, transparent, #dee2e6, transparent); 
    margin: 0 0.4rem; 
}

#eventModal .editor-area { 
    min-height: 180px; 
    padding: 1rem 1.2rem; 
    outline: none;
    font-size: 0.95rem;
    line-height: 1.6;
}

#eventModal .editor-area:empty:before {
    content: 'Escribe el mensaje aquí...';
    color: #adb5bd;
}

/* Vista de lista mejorada */
.fc-list-event-title {
    font-weight: 600;
}

.fc-list-event-time {
    font-weight: 500;
    color: #4a7c59;
}

/* Mensajes de estado vacío */
.calendar-empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #6c757d;
}

.calendar-empty-state i {
    font-size: 3rem;
    color: #4a7c59;
    opacity: 0.5;
    margin-bottom: 1rem;
}

/* Animación de carga */
.calendar-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.calendar-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-top-color: #4a7c59;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scroll personalizado */
.admin-modal .admin-modal-container::-webkit-scrollbar {
    width: 8px;
}

.admin-modal .admin-modal-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.admin-modal .admin-modal-container::-webkit-scrollbar-thumb {
    background: #4a7c59;
    border-radius: 4px;
}

.admin-modal .admin-modal-container::-webkit-scrollbar-thumb:hover {
    background: #2c5530;
}


